/* Components shared by customer site and portal. */

/* Buttons — pill, 48px tall on phones. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: var(--r-pill); border: 2px solid transparent; font: inherit; font-weight: 700; font-size: var(--fs-md); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn--primary { background: var(--purple); color: #fff; box-shadow: 0 6px 18px rgba(107, 91, 149, .32); }
.btn--primary:hover { background: var(--purple-strong); color: #fff; }
.btn--secondary { background: #fff; color: var(--purple-strong); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--purple); color: var(--purple-strong); }
.btn--ghost { background: transparent; color: var(--muted); padding-inline: 12px; }
.btn--ghost:hover { color: var(--navy); background: var(--purple-wash); }
.btn--danger { background: #fff; color: var(--red); border-color: #F1C4C0; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.reassure { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); margin-top: 10px; }
.reassure .icon { width: 16px; height: 16px; color: var(--green); }

/* Form fields */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label, .field legend, .label { font-weight: 700; font-size: var(--fs-sm); color: var(--navy); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field .req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea { width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: var(--fs-md); color: var(--text); background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); transition: border-color .15s, box-shadow .15s; appearance: none; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235A6779' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(107, 91, 149, .16); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--red); background: var(--red-pale); }
.field-error { color: var(--red); font-size: var(--fs-xs); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.field-error:empty { display: none; }
.field-warn { color: var(--amber-ink, #8A5A06); font-size: var(--fs-xs); font-weight: 600; margin: 4px 0 0; } /* a heads-up, not an error: it never blocks */
.field-warn:empty { display: none; }
.rv-warn { display: block; color: var(--amber-ink, #8A5A06); font-size: var(--fs-xs); font-weight: 600; font-family: inherit; letter-spacing: 0; }
.row { display: grid; gap: 0 14px; }
@media (min-width: 600px) { .row--2 { grid-template-columns: 1fr 1fr; } .row--3 { grid-template-columns: 1fr 1fr 1fr; } }
.input-group { position: relative; }
.input-group .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-group .input { padding-left: 44px; }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--purple); font: inherit; font-weight: 600; font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: var(--tap); }

/* Checkbox / consent */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--purple-wash); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--purple); flex: none; }
.check span { font-size: var(--fs-sm); }

/* Choice cards (radio/checkbox styled as cards) — whole card is the 44px+ target. */
.choices { display: grid; gap: 10px; }
@media (min-width: 600px) { .choices--2 { grid-template-columns: repeat(2, 1fr); } .choices--3 { grid-template-columns: repeat(3, 1fr); } .choices--4 { grid-template-columns: repeat(4, 1fr); } }
.choice { position: relative; display: flex; gap: 12px; align-items: center; min-height: 60px; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: #fff; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice__title { font-weight: 700; color: var(--navy); display: block; line-height: 1.3; }
.choice__sub { font-size: var(--fs-xs); color: var(--muted); display: block; }
.choice__mark { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.choice:has(input:checked) { border-color: var(--purple); background: var(--purple-wash); box-shadow: inset 0 0 0 1px var(--purple); }
.choice.is-checked { border-color: var(--purple); background: var(--purple-wash); box-shadow: inset 0 0 0 1px var(--purple); } /* same, for browsers without :has() (Firefox ESR 115, Safari < 15.4): classes set by app.js */
.choice:has(input:checked) .choice__mark { border-color: var(--purple); background: var(--purple); box-shadow: inset 0 0 0 4px #fff; }
.choice.is-checked .choice__mark { border-color: var(--purple); background: var(--purple); box-shadow: inset 0 0 0 4px #fff; } /* same, for browsers without :has() (Firefox ESR 115, Safari < 15.4): classes set by app.js */
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.choice.is-focus { box-shadow: var(--focus); } /* same, for browsers without :has() (Firefox ESR 115, Safari < 15.4): classes set by app.js */
.choice--amber:has(input:checked) { border-color: var(--amber); background: var(--amber-pale); box-shadow: inset 0 0 0 1px var(--amber); }
.choice--amber.is-checked { border-color: var(--amber); background: var(--amber-pale); box-shadow: inset 0 0 0 1px var(--amber); } /* same, for browsers without :has() (Firefox ESR 115, Safari < 15.4): classes set by app.js */
.choice--amber:has(input:checked) .choice__mark { border-color: var(--amber); background: var(--amber); }
.choice--amber.is-checked .choice__mark { border-color: var(--amber); background: var(--amber); } /* same, for browsers without :has() (Firefox ESR 115, Safari < 15.4): classes set by app.js */
.choice--teal:has(input:checked) { border-color: var(--teal); background: var(--teal-pale); box-shadow: inset 0 0 0 1px var(--teal); }
.choice--teal.is-checked { border-color: var(--teal); background: var(--teal-pale); box-shadow: inset 0 0 0 1px var(--teal); } /* same, for browsers without :has() (Firefox ESR 115, Safari < 15.4): classes set by app.js */
.choice--teal:has(input:checked) .choice__mark { border-color: var(--teal); background: var(--teal); }
.choice--teal.is-checked .choice__mark { border-color: var(--teal); background: var(--teal); } /* same, for browsers without :has() (Firefox ESR 115, Safari < 15.4): classes set by app.js */
.choice .svc-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }

/* Chips (multi-select) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 8px 16px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: #fff; font-weight: 600; font-size: var(--fs-sm); color: var(--text); cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip:has(input:checked) { background: var(--teal-pale); border-color: var(--teal); color: var(--teal-ink); }
.chip.is-checked { background: var(--teal-pale); border-color: var(--teal); color: var(--teal-ink); } /* same, for browsers without :has() (Firefox ESR 115, Safari < 15.4): classes set by app.js */
.chip:has(input:focus-visible) { box-shadow: var(--focus); }
.chip.is-focus { box-shadow: var(--focus); } /* same, for browsers without :has() (Firefox ESR 115, Safari < 15.4): classes set by app.js */

/* Switch rows */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; vertical-align: middle; }
.switch input { position: absolute; inset: -7px -4px; opacity: 0; cursor: pointer; z-index: 1; margin: 0; } /* 44px+ target */
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 30px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }
.switch--state { pointer-events: none; } /* picture of the state of the row it sits in (service sections on the Notify step) */
details[open] > summary .switch--state > span { background: var(--teal); }
details[open] > summary .switch--state > span::after { transform: translateX(22px); }
summary:focus-visible .switch--state > span { box-shadow: var(--focus); }

/* Panels */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
@media (min-width: 768px) { .panel { padding: 28px; } }
.panel + .panel { margin-top: 16px; }
.panel__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel__head h2, .panel__head h3 { margin: 0; font-size: var(--fs-lg); letter-spacing: -.2px; }
.panel__head .btn--ghost { margin-left: auto; }
.svc-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; }
.svc-ico--amber { background: var(--amber-pale); color: var(--amber-ink); }
.svc-ico--teal { background: var(--teal-pale); color: var(--teal-ink); }
.svc-ico--green { background: var(--green-pale); color: var(--green-ink); }
.svc-ico--purple { background: var(--purple-pale); color: var(--purple-strong); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; white-space: nowrap; }
.badge--free { background: var(--green-pale); color: var(--green-ink); }
.badge--paid { background: var(--purple-pale); color: var(--purple-strong); }
.badge--amber { background: var(--amber-pale); color: var(--amber-ink); }
.badge--teal { background: var(--teal-pale); color: var(--teal-ink); }
.badge--neutral { background: #F1F5F9; color: #475569; }
.badge--red { background: var(--red-pale); color: var(--red); }
.badge--new { background: var(--purple-pale); color: var(--purple-strong); }

/* Alerts / notices */
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--purple-wash); border: 1px solid var(--line); font-size: var(--fs-sm); }
.notice .icon { color: var(--purple); margin-top: 2px; }
.notice--warn { background: var(--amber-pale); border-color: #F3D9A6; }
.notice--warn .icon { color: var(--amber-ink); }
.notice--error { background: var(--red-pale); border-color: #F1C4C0; }
.notice--error .icon { color: var(--red); }
.notice--success { background: var(--green-pale); border-color: #BFE3C9; }
.notice--success .icon { color: var(--green-ink); }

/* Key-value rows (review, statements) */
.kv { display: grid; gap: 2px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: var(--fs-sm); }
.kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.kv .total dt, .kv .total dd { color: var(--navy); font-weight: 800; font-size: var(--fs-lg); }

/* Modal (native dialog) */
dialog.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); border: 0; border-radius: var(--r-lg); padding: 0; box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(27, 42, 74, .55); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: var(--fs-lg); margin: 0; letter-spacing: -.2px; }
.modal__body { padding: 20px; overflow-y: auto; }
.icon-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--purple-wash); color: var(--navy); }

/* Toast */
.toast-region { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 16px); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: var(--fs-sm); }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, #EFECF6 25%, #F7F5FB 50%, #EFECF6 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Empty state */
.empty { text-align: center; padding: 40px 20px; }
.empty .svc-ico { margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 18px; }
.empty p { margin-inline: auto; color: var(--muted); }

/* Status pills (portal + Manage my booking) */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); background: #F1F5F9; color: #475569; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--new, .status--pending { background: var(--purple-pale); color: var(--purple-strong); }
.status--acknowledged, .status--in_progress, .status--confirmed { background: var(--teal-pale); color: var(--teal-ink); }
.status--balance_paid, .status--dispatched { background: #E0ECFA; color: #1F4E8C; }
.status--completed, .status--reviewed { background: var(--green-pale); color: var(--green-ink); }
.status--rejected, .status--cancelled_customer, .status--cancelled_mover { background: var(--red-pale); color: var(--red); }
.status--on_hold, .status--overdue, .status--reoffered { background: var(--amber-pale); color: var(--amber-ink); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 34px; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--purple-pale); color: var(--purple-strong); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.timeline strong { color: var(--navy); }

/* Accordion (FAQ) */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 700; color: var(--navy); font-size: var(--fs-lg); min-height: var(--tap); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--purple); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 18px; color: var(--text); }
