/* The pages a customer opens without signing in: booking, packages booking, "your booking" (TDS-0018).
   They take their colours, type and controls from core/app.css; this file lays them out. Always cream: these pages
   have no light/dark switch (TDS-0017, the owner's decision 1b). */
body.public { background: var(--bg); }
.public-head { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 26px 16px 6px; }
.public-mark { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--feature); color: var(--feature-accent); font-size: .8rem; font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; }
.public-name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.public-name strong { font-size: .95rem; letter-spacing: .01em; text-transform: uppercase; }
.public-name span { font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.public-main { max-width: 720px; margin: 0 auto; padding: 12px 16px 40px; }
body.embed .public-main { padding-top: 0; }
.public-main h1 { margin: 18px 0 8px; text-align: center; font-size: clamp(2rem, 7vw, 2.9rem); letter-spacing: -.05em; line-height: 1; }
.public-main .card > h1 { margin-top: 4px; }
.public-main .card + .card { margin-top: 14px; }
.public-main .card h2 { margin-bottom: 12px; }
.public-lead { text-align: center; margin: 0 0 4px; }
.public-foot { text-align: center; padding: 20px; font-size: .85rem; }

/* ---------- The steps ---------- */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 18px 0 14px; counter-reset: step; }
.steps li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; padding: 9px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .84rem; font-weight: 500; white-space: nowrap; counter-increment: step; }
.steps li::before { content: counter(step); flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); color: var(--muted); font-size: .7rem; font-weight: 700; }
.steps li.on { background: var(--feature); color: var(--on-feature); font-weight: 600; }
.steps li.on::before { background: var(--lime); color: var(--on-lime); }
.steps li.done { background: var(--accent-soft); color: var(--text); }
.steps li.done::before { content: "✓"; background: var(--text); color: var(--bg); }
@media (max-width: 420px) { .steps li { font-size: .76rem; gap: 5px; padding: 8px 4px; } .steps li::before { width: 18px; height: 18px; } }

/* ---------- Services: search, categories, the list ---------- */
.svc-tools { display: grid; gap: 10px; margin-bottom: 4px; }
.svc-tools input[type="search"] { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 34px; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: .86rem; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--text); }
.chip.on { background: var(--feature); border-color: var(--feature); color: var(--on-feature); font-weight: 600; }
.svc-section[hidden], .svc[hidden], .svc-group[hidden] { display: none; }
.svc-cat { margin: 18px 0 8px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.svc { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; background: var(--surface); cursor: pointer; }
.svc:hover { border-color: var(--border-strong); }
.svc:has(input:checked) { border-color: var(--text); background: var(--accent-soft); }
.svc input { flex: none; margin-top: 2px; width: 20px; height: 20px; accent-color: var(--accent); }
.svc-body { flex: 1; min-width: 0; }
.svc-body small { display: block; color: var(--muted); }
.svc-price { font-weight: 600; white-space: nowrap; }
.svc-group { border: 1px solid var(--border); border-radius: 14px; padding: 12px 12px 4px; margin-bottom: 8px; }
.svc-group-name small { display: block; color: var(--muted); }
.svc-group .svc { margin: 8px 0; }
.svc-none { margin: 18px 0; text-align: center; }
.pkg.on { border-color: var(--text); background: var(--accent-soft); }
.pkg-head { display: flex; justify-content: space-between; gap: 10px; }
.pkg-head small { display: block; color: var(--muted); }
.pkg-days { margin: 8px 0; padding-left: 18px; font-size: .9rem; }
.option-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.option-row .choice { flex: 1 1 110px; }

/* ---------- Stylist, day, time ---------- */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choice { padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.choice:hover { border-color: var(--border-strong); }
.choice small { display: block; color: var(--muted); }
.choice.on { border-color: var(--text); background: var(--accent-soft); }
.date-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: thin; }
.date-strip button { flex: 0 0 auto; width: 64px; padding: 9px 0; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.date-strip button small { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; }
.date-strip button.on { background: var(--feature); border-color: var(--feature); color: var(--on-feature); }
.date-strip button.on small { color: inherit; }
#date-input { margin-bottom: 12px; max-width: 220px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; min-height: 40px; }
.slot-grid > p { grid-column: 1 / -1; margin: 6px 0; }
.slot-part { grid-column: 1 / -1; flex: 0 0 100%; margin: 12px 0 2px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.slot-part:first-child { margin-top: 2px; }
.slot-grid button, .slots .slot { min-height: 42px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.slot-grid button:hover, .slots .slot:hover { border-color: var(--text); }
.slot-grid button.on { background: var(--feature); border-color: var(--feature); color: var(--on-feature); }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.slots .slot { padding: 0 16px; }

/* ---------- The foot of a step: what is chosen, and the way on. In the long list of services it stays in view. ---------- */
.step-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.step-foot .btn.primary { margin-left: auto; }
.step-foot.stay { position: sticky; bottom: 0; z-index: 2; margin: 14px -8px -8px; padding: 12px 8px; background: var(--surface); border-top: 1px solid var(--border); border-radius: 0 0 14px 14px; }
.step-foot #svc-summary, .step-foot #pkg-summary { font-weight: 600; color: var(--text); }
.summary { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; }
.done-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 2px 0 14px; border-radius: 50%; background: var(--lime); color: var(--on-lime); font-size: 1.5rem; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- The two booking flows fit the window (the owner's review of TDS-0018, 12 November 2026): the page is as
   tall as the screen, and what belongs to a step scrolls inside its card (.step-body) with the way on always at the
   foot. Not when the page is shown inside another site (embed), nor in a window too low for it: there the page flows
   and scrolls as a whole, and the foot of the first step stays in view instead. ---------- */
@media (min-height: 560px) {
  body.public.fit:not(.embed) { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  body.fit:not(.embed) .public-head { flex: none; padding: 14px 16px 0; }
  body.fit:not(.embed) .public-mark { width: 36px; height: 36px; font-size: .68rem; }
  body.fit:not(.embed) .public-main { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; padding: 4px 16px 0; }
  body.fit:not(.embed) .public-main > * { flex: none; }
  body.fit:not(.embed) .public-main > h1 { margin: 8px 0 2px; font-size: clamp(1.5rem, 5.5vw, 2rem); }
  body.fit:not(.embed) .steps { margin: 10px 0; }
  body.fit:not(.embed) .step { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; padding-bottom: 14px; }
  body.fit:not(.embed) .step[hidden] { display: none; }
  body.fit:not(.embed) .step > * { flex: none; }
  body.fit:not(.embed) .step > .step-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -8px; padding: 2px 8px; scrollbar-width: thin; }
  body.fit:not(.embed) .step[data-panel="done"] { overflow-y: auto; }
  body.fit:not(.embed) .step-foot { margin-top: 0; padding-top: 12px; border-top: 1px solid var(--border); }
  body.fit:not(.embed) .step-foot.stay { position: static; margin: 0; padding: 12px 0 0; border-radius: 0; }
  body.fit:not(.embed) .public-foot { flex: none; padding: 8px 16px 10px; font-size: .78rem; }
}

/* ---------- "Your booking" ---------- */
.booking-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.booking-head h1 { margin: 0; text-align: left; font-size: 1.7rem; letter-spacing: -.035em; }
.public-main .kv { gap: 9px 18px; margin: 0 0 4px; }
.public-main .kv dd { font-weight: 500; }
.public-main .card .msg { margin-top: 12px; }
.public-main .card form label { display: block; font-weight: 600; margin-top: 10px; }
.public-main .card form label input { display: block; margin-top: 6px; font-weight: 400; }
.quiet-card { background: transparent; box-shadow: none; border-style: dashed; }
