/* A DSP's My shifts page, and the ask for cover in a team room. */

.my-shifts__heading {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2a37;
}
.my-shifts__week {
  margin: 1.5rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #d9d4c7;
  font-size: 1rem;
  font-weight: 700;
  color: #1f2a37;
}
.my-shifts__week:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.my-shifts__day {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #4b5563;
}
.my-shifts__card--help { border-left: 4px solid #a16207; }
.my-shifts__asked {
  font-size: 0.875rem;
  color: #a16207;
}

/* The client called out: what the DSP told us, and the form to tell us. */
.my-shifts__called-out {
  font-size: 0.875rem;
  color: #a16207;
}
.my-shifts__call-out > summary { list-style: none; cursor: pointer; }
.my-shifts__call-out > summary::-webkit-details-marker { display: none; }
.my-shifts__call-out[open] > summary { margin-bottom: 0.75rem; }
.my-shifts__call-out-form { display: grid; gap: 0.75rem; }
.my-shifts__call-out-form label { display: grid; gap: 0.25rem; font-size: 0.875rem; }

/* The ask in the team room: the coworkers see Take it; the DSP who asked
   sees that the team has been asked. */
.shift-cover {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
}
.shift-cover__waiting { display: none; font-size: 0.8125rem; color: #6b7280; }
.chat-end .shift-cover__take { display: none; }
.chat-end .shift-cover__waiting,
.shift-cover__waiting--office { display: inline; }
.shift-cover__taken { font-size: 0.8125rem; font-weight: 600; color: #2f7a4f; }


/* ---- The next five weeks, on My shifts ------------------------------ */

/* Seven narrow columns, Monday to Sunday, a row a week. A day with shifts
   is green with how many; a day off is grey; a day asked off is amber; today
   has a ring; days already over are faded. A week still being planned is
   washed out, with a line saying so. */
.my-weeks { margin-bottom: 1.75rem; }
.my-weeks__grid { display: grid; gap: 0.375rem; }
.my-weeks__row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.375rem;
}
.my-weeks__weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
}
.my-weeks__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 1px solid #e2ddd5;
  border-radius: 0.5rem;
  background: #fff;
  color: #1f2a37;
  text-decoration: none;
  line-height: 1.1;
}
.my-weeks__date { font-size: 0.875rem; font-weight: 600; }
.my-weeks__count { font-size: 0.6875rem; font-weight: 700; }
.my-weeks__day--shifts { background: #e3f1e8; border-color: #9cc9ad; color: #1f5c3a; }
a.my-weeks__day--shifts:hover { background: #cfe7d8; }
.my-weeks__day--off { background: repeating-linear-gradient(135deg, #f1efeb 0 6px, #e6e2db 6px 12px); color: #4b5563; }
.my-weeks__day--asked { background: #fff7e6; border-color: #e6b54c; color: #8a5a00; }
/* A day with shifts they asked to have off: still green, with an amber edge. */
.my-weeks__day--shifts.my-weeks__day--asked { background: #e3f1e8; border: 2px solid #e6b54c; color: #1f5c3a; }
.my-weeks__day--today { box-shadow: 0 0 0 2px #2f7a4f; }
.my-weeks__day--over { opacity: 0.45; }
.my-weeks__row--waiting .my-weeks__day { opacity: 0.35; }
.my-weeks__row--waiting .my-weeks__day > * { visibility: hidden; }
.my-weeks__waiting {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  color: #4b5563;
  pointer-events: none;
}
.my-weeks__key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: #4b5563;
}
.my-weeks__key > span { display: inline-flex; align-items: center; gap: 0.375rem; }
.my-weeks__swatch {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  min-height: 0;
  border: 1px solid #e2ddd5;
  border-radius: 0.25rem;
}
@media (min-width: 768px) {
  .my-weeks__grid, .my-weeks__key { max-width: 32rem; }
}
/* A day jumped to from the calendar lands below the sticky header. */
.my-shifts__day { scroll-margin-top: calc(var(--app-header-h, 4rem) + 1rem); }
