/* Public online booking page. Uses the CRM tokens, so it wears the niche theme and the brand colour. */
body.book { min-height: 100dvh; }
.book-boot { position: fixed; inset: 0; display: grid; place-items: center; }
.book-wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(40px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .book-wrap { padding-top: 32px; } }

/* ---------- header ---------- */
.book-head { background: var(--bg); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow-1); }
.book-head__art { aspect-ratio: 16 / 7; overflow: hidden; background: var(--surface); }
.book-head__art img { width: 100%; height: 100%; object-fit: cover; }
.book-head__brand { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
.book-logo { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; flex: none; overflow: hidden; }
.book-logo img { width: 100%; height: 100%; object-fit: cover; }
.book-head__art:not([hidden]) + .book-head__brand .book-logo { margin-top: -34px; box-shadow: 0 0 0 4px var(--bg); }
.book-head__text { flex: 1; min-width: 0; }
.book-head__name { font-family: var(--font-display); font-size: 22px; font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.2; }
.book-head__text .muted { font-size: 13.5px; }
.book-lang { flex: none; }
.book-info { display: grid; gap: 6px; padding: 8px 16px 16px; font-size: 14px; color: var(--ink-2); }
.book-info > p, .book-hours summary { display: flex; align-items: center; gap: 8px; }
.book-info .ic { color: var(--accent-text); flex: none; }
.book-info a { color: var(--ink); font-weight: 600; }
.book-hours summary { cursor: pointer; list-style: none; }
.book-hours summary::-webkit-details-marker { display: none; }
.book-hours summary::after { content: "›"; transform: rotate(90deg); margin-left: 2px; color: var(--ink-3); }
.book-hours[open] summary::after { transform: rotate(-90deg); }
.book-hours__list { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 8px 0 0 24px; font-size: 13px; }
.book-hours__list > div { display: contents; }
.book-note { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-size: 13px; }

/* ---------- steps ---------- */
.book-flow { display: grid; gap: 12px; margin-top: 12px; }
.book-step { min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: 16px; scroll-margin-top: 12px; animation: book-in .25s var(--ease); }
@keyframes book-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.book-step__title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-family: var(--font-display); font-size: 17px; font-weight: var(--display-weight); letter-spacing: var(--display-tracking); }
.book-step__n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; flex: none; }
.book-cat + .book-cat { margin-top: 14px; }
.book-cat__title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 0 2px 6px; }
.book-options { display: grid; gap: 6px; }
.book-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); text-align: left; transition: border-color .15s, background-color .15s; }
.book-option:hover { border-color: var(--line-strong); }
.book-option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.book-option__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.book-option__name { font-weight: 600; }
.book-option__sub { font-size: 13px; color: var(--ink-2); }
.book-option__price { font-weight: 700; white-space: nowrap; }

.book-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.book-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--bg); font-weight: 500; transition: border-color .15s, background-color .15s; }
.book-chip__dot { width: 8px; height: 8px; border-radius: 99px; background: var(--c, var(--accent)); }
.book-chip--any .book-chip__dot { background: conic-gradient(var(--series-1), var(--series-2), var(--series-3), var(--series-4), var(--series-1)); }
.book-chip:hover { border-color: var(--ink-3); }
.book-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.book-chip[aria-pressed="true"] .book-chip__dot { background: var(--accent-ink); }

.book-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.book-day { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 56px; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); scroll-snap-align: start; flex: none; }
.book-day small { font-size: 11px; color: var(--ink-3); }
.book-day b { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.book-day:hover:not(:disabled) { border-color: var(--line-strong); }
.book-day:disabled { opacity: .35; cursor: not-allowed; }
.book-day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.book-day[aria-pressed="true"] small { color: var(--accent-ink); opacity: .8; }

.book-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.book-time { min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); font-weight: 600; transition: border-color .15s, background-color .15s; }
.book-time:hover { border-color: var(--accent); }
.book-time[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.book-time { display: grid; place-content: center; gap: 1px; line-height: 1.15; }
.book-time__tariff { font-size: 10.5px; font-weight: 700; color: var(--ok); }
.book-time.is-tariff { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 6%, var(--bg)); }
.book-time[aria-pressed="true"] .book-time__tariff { color: var(--accent-ink); }
.book-empty { padding: 16px; text-align: center; color: var(--ink-3); font-size: 14px; }

.book-summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--accent-soft); border-color: transparent; }
.book-summary .ic { color: var(--accent-text); }
.book-summary > div { display: flex; flex-direction: column; min-width: 0; }
.book-summary .muted { font-size: 13px; }
.book-submit { min-height: 52px; font-size: 16px; }
/* auto service: the car's number reads as a plate — mono, upper case; the example in the placeholder stays plain */
.book-plate.input { font-family: var(--font-mono); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.book-plate.input::placeholder { font-family: var(--font-body); font-weight: 400; letter-spacing: 0; text-transform: none; }
.book-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- done / closed ---------- */
.book-done { margin-top: 12px; padding: 32px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: calc(var(--radius) + 6px); }
.book-done__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 99px; background: var(--ok); color: #fff; margin-bottom: 8px; }
.book-done__icon .ic { width: 30px; height: 30px; stroke-width: 2.5; }
.book-done__title { font-family: var(--font-display); font-size: 22px; font-weight: var(--display-weight); }
.book-done__when { font-size: 17px; font-weight: 600; }
.book-done__hint { font-size: 13px; margin: 8px 0 12px; max-width: 40ch; }
.book-closed { margin-top: 24px; padding: 32px 20px; text-align: center; color: var(--ink-2); }
.book-foot { text-align: center; font-size: 12px; margin-top: 24px; }

/* salons (module pricing): a performer's price by her level, beside her name */
.book-chip__price { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.book-chip__price:empty { display: none; }
.book-chip[aria-pressed="true"] .book-chip__price { color: inherit; opacity: .85; }

/* a prepayment asked (module deposits): said under the booking done */
.book-done__deposit { padding: 10px 14px; border-radius: 12px; background: var(--warn-soft, #fff4e0); color: var(--warn, #a15c00); font-weight: 600; }

/* a promo or a friend's code (module promo): checked as typed — green when it works */
.book-promo.input { font-family: var(--font-mono); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.book-promo.input::placeholder { font-family: var(--font-body); font-weight: 400; letter-spacing: 0; text-transform: none; }
.field.is-ok .field__hint { color: var(--ok); font-weight: 600; }
.field.has-error .field__hint { color: var(--bad); }
.book-done__promo { padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }

/* ---------- the AI administrator (module aiadmin, variant A): a button in the corner, the talk in a sheet ---------- */
.ai-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 10px; }
.ai-fab__tip { max-width: 220px; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(30, 10, 20, .18); animation: book-in .3s var(--ease); }
.ai-fab__btn { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  border: 3px solid var(--bg); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .15s; }
.ai-fab__btn:hover { transform: scale(1.05); }
.ai-fab__btn .ic { width: 26px; height: 26px; }
body.ai-is-open .ai-fab { display: none; }
body.ai-is-open { overflow: hidden; }

.ai-sheet { position: fixed; inset: 0; z-index: 50; }
.ai-sheet__dim { position: absolute; inset: 0; background: rgba(20, 8, 16, .42); animation: ai-fade .2s ease; }
@keyframes ai-fade { from { opacity: 0; } }
.ai-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 640px; height: min(640px, 86dvh);
  display: flex; flex-direction: column; background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(20, 8, 16, .2);
  animation: ai-up .25s var(--ease); }
@keyframes ai-up { from { transform: translateY(40px); opacity: 0; } }
.ai-sheet__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ai-sheet__ava { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #fff)); }
.ai-sheet__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-sheet__who b { font-size: 16px; }
.ai-sheet__who small { font-size: 12px; font-weight: 600; color: var(--ok); }
.ai-sheet__x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: transparent; color: var(--ink-2); }
.ai-sheet__msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px; overscroll-behavior: contain; }
.ai-b { max-width: 84%; padding: 10px 13px; border-radius: 18px; font-size: 15px; line-height: 1.4; animation: book-in .2s var(--ease); }
.ai-b p { white-space: pre-line; }
.ai-b--me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.ai-b--ai { align-self: flex-start; background: var(--accent-soft); color: var(--ink); border-bottom-left-radius: 6px; }
.ai-b__tag { display: inline-flex; align-items: center; gap: 3px; margin-bottom: 4px; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 700;
  color: var(--accent-text); background: var(--bg); }
.ai-b__tag .ic { width: 11px; height: 11px; }
.ai-b--typing { display: inline-flex; gap: 4px; align-self: flex-start; background: var(--accent-soft); padding: 13px 14px; }
.ai-b--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-text); opacity: .4; animation: ai-dot 1s infinite; }
.ai-b--typing i:nth-child(2) { animation-delay: .15s; }
.ai-b--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 50% { opacity: 1; transform: translateY(-2px); } }
.ai-done { align-self: stretch; padding: 12px 14px; border-radius: 16px; background: var(--ok-soft); border: 1.5px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.ai-done b { display: flex; align-items: center; gap: 6px; color: var(--ok); }
.ai-done p { margin-top: 4px; font-size: 14px; font-weight: 600; }
.ai-done small { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.ai-sheet__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.ai-sheet__chips[hidden] { display: none; }
.ai-chip { padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--accent); background: var(--bg); color: var(--accent-text); font-weight: 700; font-size: 14px; }
.ai-chip:hover { background: var(--accent-soft); }
.ai-sheet__composer { display: flex; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.ai-sheet__composer .input { flex: 1; border-radius: 22px; min-height: 44px; }
.ai-sheet__send { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); flex: none; }
@media (prefers-reduced-motion: reduce) { .ai-sheet__panel, .ai-sheet__dim, .ai-b, .ai-fab__tip { animation: none; } .ai-b--typing i { animation: none; opacity: .7; } }
