/* Drawer shell — sits below the time picker, above everything else */
.drawer_backdrop_div {
  position: fixed;
  inset: 0;
  z-index: 150;
  background-color: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: flex-end;
}

.day_sheet_div {
  width: min(380px, 92vw);
  height: 100%;
  background-color: var(--surface_container_lowest_color);
  border-left: 1px solid var(--border_color);
  border-top: 8px solid var(--primary_color);
  box-shadow: var(--shadow_strong);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
  animation: day_sheet_slide_in 0.2s ease;
}

@keyframes day_sheet_slide_in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.day_sheet_header_div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.day_sheet_title_div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.day_sheet_title_text {
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
}
.day_sheet_badge_span {
  align-self: flex-start;
  margin-top: 8px;
  background-color: rgba(255, 204, 0, 0.12);
  border-left: 4px solid var(--primary_color);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary_color);
}
/* Same badge, for a day that was declared free rather than a holiday */
.day_sheet_badge_off {
  margin-top: 0;
  background-color: var(--surface_container_color);
  border-left-color: var(--border_strong_color);
  color: var(--text_secondary_color);
}
.day_sheet_close_button {
  color: var(--text_secondary_color);
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s ease;
}
.day_sheet_close_button:hover {
  color: var(--text_primary_color);
}

.day_sheet_section_div {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.day_sheet_row_div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border_subtle_color);
  padding-bottom: 12px;
}
.day_sheet_row_div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.day_sheet_row_label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text_secondary_color);
}
.day_sheet_row_value {
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
}
.day_sheet_value_yellow {
  color: var(--primary_color);
}
.day_sheet_value_red {
  color: var(--secondary_text_color);
}
.day_sheet_value_muted {
  color: var(--text_tertiary_color);
}
.day_sheet_hint_text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text_tertiary_color);
  border-left: 2px solid var(--border_strong_color);
  padding-left: 12px;
}

.day_sheet_actions_div {
  margin-top: auto;
  display: flex;
}
.day_sheet_actions_div .secondary_action_button {
  width: 100%;
  justify-content: center;
}

/*
 * With the bottom bar in place the drawer stops being a side panel. It rises
 * from the bottom, sits centred above the bar so the navigation stays visible
 * and undimmed, and tightens its type and spacing for a phone.
 */
@media (max-width: 720px) {
  .drawer_backdrop_div {
    bottom: var(--mobile_nav_height);
    align-items: flex-end;
    justify-content: center;
  }
  .day_sheet_div {
    width: calc(100% - 24px);
    max-width: 420px;
    height: auto;
    max-height: 100%;
    padding: 20px 18px;
    gap: 20px;
    border: 1px solid var(--border_color);
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    /*
     * Upwards only, and pulled in by the negative spread. The sheet rests on the
     * bar, so a shadow whose blur reaches further than its offset would spill
     * back down and shade the bar's top edge: -20 + 24/2 - 8 keeps it 16px clear.
     */
    box-shadow: 0 -20px 24px -8px rgba(0, 0, 0, 0.55);
    /* Keeps the duration and easing of the shorthand above */
    animation-name: day_sheet_slide_up;
  }
  .day_sheet_title_text {
    font-size: 20px;
    letter-spacing: -0.5px;
  }
  .day_sheet_header_div {
    gap: 12px;
  }
  .day_sheet_section_div {
    gap: 12px;
  }
  .day_sheet_row_div {
    padding-bottom: 8px;
  }
  .day_sheet_row_value {
    font-size: 16px;
  }
  .day_sheet_row_label {
    font-size: 10px;
  }
  .day_sheet_hint_text {
    font-size: 10px;
    padding-left: 10px;
  }
  .day_sheet_actions_div .secondary_action_button {
    padding: 10px 16px;
    font-size: 11px;
  }
}

@keyframes day_sheet_slide_up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Last, so it switches off whichever animation the rules above selected */
@media (prefers-reduced-motion: reduce) {
  .day_sheet_div {
    animation: none;
  }
}
