/* Planner (light "store" configurator), finale with the pharmacy receipt, footer. Tokens in style.css. */

/* ---------- Planner ---------- */

.planner {
  position: relative;
  background: var(--paper);
  color: var(--graphite);
  padding-top: clamp(88px, 14vh, 140px);
}

.planner__title {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.planner__sub {
  margin-top: 14px;
  max-width: 40ch;
  color: var(--stone);
  font-size: 19px;
  line-height: 1.4;
}

.step { margin-top: clamp(44px, 7vh, 64px); }

.step__title {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.step__title b { color: var(--graphite); font-weight: 600; }
.step__title span { color: var(--stone); }
.step__title label { cursor: pointer; }

.step__error {
  margin-top: 10px;
  color: var(--rose-deep);
  font-weight: 600;
  font-size: 15px;
}

.step.has-error .day,
.step.has-error .tile,
.step.has-error .time { border-color: var(--rose); }

.choice {
  position: relative;
  border: 1px solid var(--tile-line);
  border-radius: 14px;
  background: var(--white);
  color: var(--graphite);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease-out), opacity 200ms ease;
}

.choice:active { transform: scale(0.97); }

.choice[aria-checked="true"],
.choice[aria-pressed="true"] {
  border-color: var(--rose);
  box-shadow: 0 0 0 1px var(--rose);
}

.choice:disabled { opacity: 0.35; cursor: default; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .choice:not(:disabled):hover { border-color: #aeaeb2; }
  .choice[aria-checked="true"]:hover,
  .choice[aria-pressed="true"]:hover { border-color: var(--rose); }
}

/* One weekend at a time: its two days, and a quiet way to the next weekend. */
.weekend {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78px;
  gap: 10px;
}

.weekend__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 52px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--rose-deep);
  font: 600 16px/1.25 var(--font-sans);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}

.weekend__nav[hidden] { display: none; }
.weekend__nav:active { transform: scale(0.97); }
.weekend__nav svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.weekend__nav--next { text-align: left; }

@media (hover: hover) and (pointer: fine) {
  .weekend__nav:hover { background: rgba(198, 58, 97, 0.07); }
}

.days__none { color: var(--stone); font-size: 17px; }

.day {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px 4px 10px;
}

.day__wd { font-size: 13px; color: var(--stone); white-space: nowrap; }
.day__num { font-size: 28px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.day__mon { font-size: 13px; color: var(--stone); }

/* Pickup times; a session (rink, concert) also says what happens then. */
.times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.times:has(.time--detail) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

.times__hint { color: var(--stone); font-size: 17px; line-height: 1.4; }

.time {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-height: 56px;
  padding: 10px 14px;
}

.time--detail {
  justify-items: start;
  text-align: left;
  padding: 12px 16px;
}

.time__at { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.time__what { font-size: 14px; line-height: 1.35; color: var(--stone); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 734px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tile {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  align-content: start;
  column-gap: 10px;
  row-gap: 6px;
  min-height: 104px;
  padding: 16px 38px 16px 14px;
  text-align: left;
}

.tile__icon { width: 24px; height: 24px; color: var(--rose); }
.tile__icon svg { display: block; width: 24px; height: 24px; }
.tile__title { font-size: 17px; font-weight: 600; line-height: 1.25; hyphens: auto; overflow-wrap: anywhere; }
.tile__desc { grid-column: 1 / -1; font-size: 14px; line-height: 1.35; color: var(--stone); hyphens: auto; }

.tile__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--tile-line);
  display: grid;
  place-items: center;
  color: var(--white);
  transition: background-color 160ms ease, border-color 160ms ease;
}

.tile[aria-checked="true"] .tile__check { background: var(--rose); border-color: var(--rose); }
.tile__check svg { opacity: 0; transition: opacity 120ms ease; }
.tile[aria-checked="true"] .tile__check svg { opacity: 1; }
.tile.is-closed .tile__desc { color: var(--rose-deep); }

/* Kirill's remarks under a choice, in his handwriting. */
.hand-note {
  margin-top: 16px;
  max-width: 34ch;
  color: var(--rose-deep);
  font: 600 clamp(22px, 2.6vw, 26px)/1.15 var(--font-hand);
  rotate: -1.2deg;
  transform-origin: 0 50%;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 734px) {
  .options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.option {
  min-height: 56px;
  padding: 12px 16px;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
}

.wish { position: relative; }

.wish textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  padding: 14px 16px 28px;
  border: 1px solid var(--tile-line);
  border-radius: 14px;
  background: var(--white);
  color: var(--graphite);
  font: 400 17px/1.45 var(--font-sans);
  resize: vertical;
  color-scheme: light;
  caret-color: var(--rose);
}

.wish textarea::placeholder { color: #a1a1a6; }
.wish textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose); }

.wish__count {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 12px;
  color: var(--stone);
  font-variant-numeric: tabular-nums;
}

.bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: clamp(56px, 9vh, 88px);
  background: rgba(250, 250, 252, 0.94);
  border-top: 1px solid var(--line-light);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .bar {
    background: rgba(250, 250, 252, 0.8);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}

.bar__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px var(--gutter-r) 12px var(--gutter-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bar__summary {
  min-width: 0;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--graphite);
}

.bar__summary.is-empty { color: var(--stone); font-weight: 500; }
.bar .pill { flex: none; }

/* ---------- Finale: the receipt rolls out of a printer ---------- */

.done {
  background: var(--night);
  padding-block: clamp(96px, 14vh, 150px) clamp(80px, 12vh, 120px);
  text-align: center;
  overflow: hidden;
}

.done__title {
  font-size: clamp(52px, 11vw, 104px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.done__sub {
  margin-top: 12px;
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 600;
  color: var(--mist);
}

.receipt-stage {
  position: relative;
  width: min(100%, 360px);
  margin: clamp(36px, 6vh, 56px) auto 0;
}

.printer {
  position: relative;
  z-index: 2;
  height: 34px;
  border-radius: 14px 14px 10px 10px;
  background: linear-gradient(180deg, #3a3a3d, #1c1c1e);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.printer__slot {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 8px;
  height: 6px;
  border-radius: 3px;
  background: #050505;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.8);
}

.receipt {
  --zig: 9px;
  position: relative;
  z-index: 1;
  width: 88%;
  margin: -12px auto 0;
  padding: 28px 20px calc(26px + var(--zig));
  background: #fbfaf6;
  color: #1d1d1f;
  text-align: left;
  font: 500 13.5px/1.55 var(--font-mono);
  transform-origin: 50% 0;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.55));
}

.receipt__shop {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.receipt__place { text-align: center; color: #6e6e73; font-size: 12.5px; }
.receipt__rule { margin: 12px 0; border-top: 1.5px dashed #b9b9bf; }
.receipt__item,
.receipt__sum { display: flex; justify-content: space-between; gap: 12px; }
.receipt__item { font-weight: 600; }
.receipt__lines { display: grid; gap: 2px; margin-top: 6px; }
.receipt__row { display: grid; grid-template-columns: 9.5ch minmax(0, 1fr); gap: 8px; }
.receipt__row dt { color: #6e6e73; }
.receipt__row dd { overflow-wrap: anywhere; }
.receipt__sum--total { font-size: 15px; font-weight: 600; }
.receipt__qr { width: 96px; height: 96px; margin: 16px auto 10px; }
.receipt__qr svg { display: block; width: 100%; height: 100%; }
.receipt__thanks { text-align: center; font-weight: 600; }
.receipt__no { margin-top: 2px; text-align: center; color: #6e6e73; font-size: 12px; }

.actions {
  margin-top: clamp(36px, 6vh, 56px);
  display: grid;
  justify-items: center;
  gap: 10px;
}

.actions__note { color: var(--mist); font-size: 15px; }

/* "Kirill already has your answer": shown only after the relay confirmed delivery. */
.delivered {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #30d158;
}

.delivered svg { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.delivered--light { margin-top: 18px; color: #1f7a3a; }

.actions__row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
}

.share {
  width: min(100%, 460px);
  margin-top: 8px;
  display: grid;
  gap: 12px;
}

.share__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.share__text {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font: 400 15px/1.45 var(--font-sans);
  resize: none;
}

/* ---------- Footer ---------- */

.foot {
  background: var(--night);
  color: var(--mist);
  border-top: 1px solid var(--line-dark);
  font-size: 12px;
  line-height: 1.5;
  padding-block: 28px calc(32px + env(safe-area-inset-bottom, 0px));
}

.foot__notes { padding-left: 1.4em; display: grid; gap: 6px; }
.foot__risks { margin-top: 12px; }
.foot__made { margin-top: 18px; color: var(--ink); opacity: 0.75; }

.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
}

/* ---------- Reduced motion: keep fades, drop movement ---------- */

@media (prefers-reduced-motion: reduce) {
  .mini-capsule,
  .slider__text,
  .scroll-cue__line::after,
  .mark > * { animation: none; }
  .slider__text { color: rgba(245, 245, 247, 0.75); background: none; }
  .gate { transition: opacity 300ms ease, visibility 0s linear 300ms; }
  .gate.is-open { transform: none; }
  .nav { transition: background-color 300ms ease, color 300ms ease; }
}
