/* Public booking: the same tokens the operations screens use, so the two
   halves of the product stop looking like two products. */

.availability-picker, .booking-form { max-width: 34rem; }
.availability-picker { background: var(--c-surface); border-radius: var(--radius); padding: var(--space-4); margin-bottom: var(--space-4); }
.availability-picker .field:last-child { margin-bottom: 0; }

.slot-choices { border: 0; margin: 0; padding: 0; }
.slot-choices legend { font-weight: 650; margin-bottom: var(--space-2); }
.slot-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.slot-choices legend { flex: 1 0 100%; }
.slot-option {
  display: inline-flex; align-items: center; gap: var(--space-1);
  min-height: var(--tap); padding: 0 var(--space-3);
  border: 1px solid var(--c-line-strong); border-radius: 2rem;
  background: var(--c-surface); font-weight: 600; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.slot-option:has(input:checked) { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.slot-option:focus-within { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.slot-empty { color: var(--c-ink-muted); margin: 0; }

[data-slots][aria-busy="true"] { opacity: .55; }

/* --- Strona startowa ------------------------------------------------------
   Otwiera ją zwykle ktoś stojący w hali z telefonem w jednej ręce. Pierwszy
   ekran ma odpowiedzieć na to, po co przyszedł: które targi, gdzie stoisko,
   jak umówić spotkanie. Bez dekoracyjnej pustki na górze — na telefonie to
   najcenniejsze miejsce, a nie miejsce na oddech. */

.landing { display: grid; gap: var(--space-4); max-width: 34rem; }
.landing-card { background: var(--c-surface); border-radius: var(--radius); padding: var(--space-4); display: grid; gap: var(--space-2); }
.landing-when { margin: 0; font-size: var(--t-meta); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-accent); }
.landing-title { margin: 0; font-size: 1.6rem; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.landing-where { margin: 0; color: var(--c-ink-muted); font-size: .95rem; }
.landing-cta { width: 100%; margin-top: var(--space-2); font-size: 1.05rem; }
.landing-note { margin: 0; color: var(--c-ink-muted); font-size: var(--t-meta); }
.landing-closed {
  margin: var(--space-2) 0 0; padding: var(--space-3);
  background: var(--c-warn-soft); color: var(--c-warn);
  border-radius: var(--radius-sm); font-weight: 700;
}
.landing-live { margin: 0; padding: var(--space-2) var(--space-3); background: var(--c-free-soft); color: var(--c-free); border-radius: var(--radius-sm); font-weight: 600; font-size: var(--t-meta); }

.landing-block { background: var(--c-surface); border-radius: var(--radius); padding: var(--space-4); }
.landing-block h2 { margin: 0 0 var(--space-3); font-size: var(--t-meta); letter-spacing: .07em; text-transform: uppercase; color: var(--c-ink-muted); }
/* Pill shapes suit short labels. These names are long and bilingual, so as
   pills each one took a whole line and the section swallowed the screen. A
   plain dense list reads faster and costs a third of the height. */
.landing-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.landing-topics li { font-size: var(--t-meta); line-height: 1.35; padding-left: .9rem; position: relative; }
.landing-topics li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--c-accent); }
@media (min-width: 30rem) { .landing-topics { grid-template-columns: 1fr 1fr; gap: .35rem var(--space-4); } }
.landing-langs { margin: 0; display: flex; gap: var(--space-2); }
.landing-lang { background: var(--c-accent-soft); color: var(--c-accent); border-radius: var(--radius-sm); padding: .2rem .6rem; font-weight: 800; font-size: var(--t-meta); letter-spacing: .04em; }
.landing-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: var(--space-2); }
.landing-steps li { padding-left: .2rem; }
.landing-privacy { margin: 0; text-align: center; }
/* The only link on the landing page. It is the action, not a footnote. */
.landing-privacy a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 var(--space-4); font-weight: 700;
}

@media (min-width: 44rem) {
  .landing { max-width: 44rem; grid-template-columns: 1fr 1fr; align-items: start; }
  .landing-card { grid-column: 1 / -1; }
  .landing-privacy { grid-column: 1 / -1; }
  .landing-title { font-size: 2rem; }
}


/* A link on its own line under a field is something to tap, not a word in a
   sentence — WCAG's inline exception does not cover it and neither should we. */
.field > p > a, .field-link {
  display: inline-flex; align-items: center;
  min-height: var(--tap); font-weight: 700;
}

/* ---- The booking form as six questions ---------------------------------
   Each step is a card with a number, so the person can see where they are
   without a progress bar to maintain. The numbers are the questions, not the
   system's screens: nothing here mentions products, resources or allocation. */

.booking-step-form { max-width: var(--page-max); }
.booking-step {
  background: var(--c-surface); border-radius: var(--radius);
  padding: var(--space-4); margin-bottom: var(--space-4);
  box-shadow: var(--shadow);
}
.booking-step > :last-child { margin-bottom: 0; }
/* The number badge and the question are flex items, and a bare text node
   becomes one too — which cannot shrink below its longest word. At 200% zoom
   "porozmawiać?" alone is wider than the column, so the heading has to be
   allowed both to wrap and to break. */
.booking-step-title {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3);
  font-size: var(--t-section); margin: 0 0 var(--space-4);
  min-width: 0; overflow-wrap: anywhere;
}
.booking-step-num {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--c-ink); color: var(--c-surface);
  font-family: var(--font-numeric); font-size: var(--t-body); font-weight: 700;
}

/* ---- One choice out of a few ------------------------------------------ */
.choice-set { border: 0; margin: 0; padding: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice {
  flex: 1 1 7rem;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--tap-lg); padding: 0 var(--space-4);
  border: 2px solid var(--c-line-strong); border-radius: var(--radius);
  background: var(--c-surface); cursor: pointer;
  font-size: var(--t-body); font-weight: 700;
}
/* The radio itself is not the target and not the signal — the whole label is
   both. It stays in the accessibility tree, so a screen reader and the
   keyboard still see an ordinary radio group. */
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-label { pointer-events: none; }
.choice:has(input:focus-visible) { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* Selected state is never colour alone: a tick and a heavier border carry it
   for anyone who cannot separate the two greens (WCAG SC 1.4.1). */
.choice:has(input:checked), .choice.is-selected {
  border-color: var(--c-ink); background: var(--c-ink); color: var(--c-surface);
}
.choice:has(input:checked)::before, .choice.is-selected::before { content: "✓"; font-weight: 700; }

/* ---- Free times -------------------------------------------------------- */
.slot-choices { border: 0; margin: 0; padding: 0; }
.slot-choices legend { font-size: var(--t-body); font-weight: 700; margin-bottom: var(--space-2); }
.slot-choices {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
}
.slot-option {
  flex: 0 1 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
  min-width: 5.5rem; min-height: var(--tap); padding: 0 var(--space-3);
  border: 2px solid var(--c-line-strong); border-radius: var(--radius);
  background: var(--c-surface); cursor: pointer;
  font-family: var(--font-numeric); font-variant-numeric: tabular-nums;
  font-size: var(--t-body); font-weight: 700;
}
.slot-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot-option:has(input:focus-visible) { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.slot-option:has(input:checked) {
  border-color: var(--c-ink); background: var(--c-ink); color: var(--c-surface);
}
.slot-option:has(input:checked)::before { content: "✓"; font-family: var(--font-brand); }
.slot-empty { margin: 0; font-size: var(--t-body); color: var(--c-ink-muted); }
[data-slots][aria-busy="true"] { opacity: .6; }

/* A chosen day carries the same tick, for the same reason. */
.day-picker-option:has(input:checked) { border-color: var(--c-ink); border-width: 3px; }
.day-picker-option:has(input:checked) .day-picker-date::before { content: "✓ "; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* On a wide screen the questions sit in two columns rather than one long
   scroll — the same six questions, less travel. Not a different flow. */
@media (min-width: 62rem) {
  .booking-step-form { max-width: 62rem; }
  .availability-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-4); align-items: start; }
  .availability-picker > .booking-step:nth-child(3) { grid-row: span 2; }
  .booking-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-4); align-items: start; }
  .booking-form > .booking-step:first-of-type { grid-column: 1 / -1; }
}

/* The landing sections must be able to fall below their content's natural
   width; at 200% zoom the page has 195 CSS pixels and nothing may insist on
   more. */
.landing, .landing-card, .landing-block { min-width: 0; }
.landing-card > *, .landing-block > * { min-width: 0; overflow-wrap: anywhere; }

/* ---- Public landing: one page, two very different readers -----------------
 *
 * Most arrivals scanned a code and are standing in the hall with one hand free.
 * Some were sent a link and are at a desk. The page serves both by answering to
 * the *width* it is given, never by guessing the device — user-agent sniffing
 * is wrong often enough to be a maintenance debt, and it is wrong in exactly
 * the cases that matter (tablets, split screens, desktop windows resized).
 *
 * Narrow: the decision only — when, where, and the button. Everything else is
 * folded or dropped, because the form itself asks for language and numbers its
 * own steps.
 *
 * Wide: all of it, in two columns, using the screen instead of a 578px ribbon
 * down the middle of a monitor.
 */

.landing-main { max-width: min(72rem, 100%); }

/* Type that grows with the viewport rather than sitting at one size on every
   screen. The floor is what a phone in sunlight needs; the ceiling is what
   stops a headline from shouting on a monitor. */
.landing-title { font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.6rem); }
.landing-cta { font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.25rem); }
.landing-where,
.landing-note { font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem); }

/* Section labels were 15.3px — the smallest text on the page and the hardest to
   read outdoors. */
.landing-block h2 { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1rem); }
.landing-topics li { font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem); }

/* Secondary on a phone means absent.
 *
 * The topic list, the languages and the three "how it works" steps are all
 * answered by the very next screen: step 1 of the form is a list of every
 * topic, step 2 asks the language, and the steps are numbered 1–4 as you go.
 * On a phone they are a page to scroll past before reaching the button, which
 * is the only thing somebody standing in the hall came for. On a wide screen
 * they are the reason to book at all, so they stay. */
@media (max-width: 47.99rem) {
  .landing-secondary { display: none; }
}

@media (min-width: 48rem) {
  .landing {
    max-width: none;
    grid-template-columns: minmax(20rem, 26rem) minmax(0, 1fr);
    align-items: start;
  }
  /* The decision gets the full width; the supporting blocks share what is left.
     Somebody at a desk is reading, not tapping, so the reasons to book sit
     beside each other instead of below the fold. */
  .landing-card { grid-column: 1 / -1; }
  .landing-privacy { grid-column: 1 / -1; }

  /* Open, and with no control to close it: on a wide screen the list is the
     reason somebody books, and a fold there would hide the offer. Author rules
     beat the browser's own `details:not([open])` hiding. */
  .landing-topics { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
}

/* The date is the first thing somebody checks — "is this the day I am here?" —
   and it was the smallest text on the page. */
.landing-when { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1rem); }
.landing-lang { font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem); }

@media (min-width: 48rem) {
  /* No disclosure triangle where there is nothing to disclose: the list is held
     open by the rule above and the summary is not clickable. */
}
