/* test-day: the test-day slider and its sheet, combined by the asset build. */
/* The test-day slider (components/controls/date-ribbon.js), its first part:
   the chosen day in words, and how many days are left to go. */
.date-ribbon {
  /* minmax(0, 1fr): the strip holds a year of days, and scrolls inside the
     column rather than stretching it. */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}
.date-readout {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}
.date-readout-weekday {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-2);
}
.date-readout-day {
  margin: 0;
  font-size: 38px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}
/* A badge: white on blue, and white on green once the day is saved. */
.date-readout-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 15px 6px;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  text-shadow: 0 1px 0 var(--brand-lip);
  box-shadow: 0 3px 0 var(--brand-lip);
}
.date-readout-count b {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}
.date-readout-tick {
  display: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.date-ribbon.is-saved .date-readout-tick {
  display: block;
}
.date-ribbon.is-saved .date-readout-count {
  background: var(--correct);
  text-shadow: 0 1px 0 var(--correct-lip);
  box-shadow: 0 3px 0 var(--correct-lip);
  animation: date-ribbon-pop 0.42s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes date-ribbon-pop {
  40% {
    transform: scale(1.18);
  }
}
@media (prefers-reduced-motion: reduce) {
  .date-readout-count {
    animation: none;
  }
}
/* The test-day slider (components/controls/date-ribbon.js), its second part:
   the strip of days under a fixed marker, and the jumps. */
.date-ribbon-track {
  position: relative;
  min-width: 0;
}
.date-ribbon-marker {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  width: 0;
  height: 0;
  border: 9px solid transparent;
  border-top-color: var(--brand);
  transform: translateX(-50%);
  pointer-events: none;
}
.date-ribbon-track:has(.date-ribbon-strip:focus-visible) .date-ribbon-marker {
  border-top-color: var(--focus-ring);
}
.date-ribbon-strip {
  display: flex;
  gap: 8px;
  padding: 22px calc(50% - 27px) 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  cursor: grab;
  touch-action: pan-x;
}
.date-ribbon-strip::-webkit-scrollbar {
  display: none;
}
.date-ribbon-strip:focus-visible {
  outline: none;
}
.date-ribbon-strip.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
}
.date-ribbon-day {
  position: relative;
  flex: 0 0 54px;
  height: 70px;
  box-sizing: border-box;
  scroll-snap-align: center;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border: 2px solid var(--line-2);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--line-2);
  user-select: none;
  transition:
    transform 0.16s ease-out,
    background 0.16s,
    border-color 0.16s,
    box-shadow 0.16s;
}
/* Each month's first day wears the month's name. */
.date-ribbon-day[data-month]::before {
  content: attr(data-month);
  position: absolute;
  top: -19px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow: 0 1px 0 var(--brand-lip);
}
.date-ribbon-dow {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
}
.date-ribbon-num {
  font-size: 21px;
  font-weight: 900;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.date-ribbon-day.is-sunday {
  background: var(--panel-2);
}
.date-ribbon-day.is-on {
  background: var(--brand);
  border-color: var(--brand-lip);
  box-shadow: 0 4px 0 var(--brand-lip);
  transform: translateY(-5px) scale(1.07);
}
.date-ribbon-day.is-on :is(.date-ribbon-dow, .date-ribbon-num) {
  color: #fff;
  text-shadow: 0 1px 0 var(--brand-lip);
}
.date-ribbon.is-saved .date-ribbon-day.is-on {
  background: var(--correct);
  border-color: var(--correct-lip);
  box-shadow: 0 4px 0 var(--correct-lip);
}
.date-ribbon.is-saved .date-ribbon-day.is-on :is(.date-ribbon-dow, .date-ribbon-num) {
  text-shadow: 0 1px 0 var(--correct-lip);
}

.date-ribbon-jumps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.date-ribbon-jump {
  padding: 8px 14px;
  border: 2px solid var(--line-2);
  border-radius: 14px;
  background: var(--paper);
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 3px 0 var(--line-2);
}
.date-ribbon-jump:active {
  transform: translateY(3px);
  box-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  .date-ribbon-day {
    transition: none;
  }
}
/* The test-day sheet (features/settings/test-day-sheet.js): the slider in the
   calendar sheet's shape, with its headline tier and its two actions. */
.test-day-panel {
  padding-bottom: calc(20px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
}
#testDayModal .test-day-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.3px;
}
#testDayModal .calendar-actions :is(.big, .ghost) {
  width: 100%;
  margin: 0;
  min-height: 52px;
}
@media (min-width: 720px) {
  #testDayModal .panel {
    max-width: 440px;
  }
}
