/* ============================================================================
   Provet onboarding portal — styles
   Section order: tokens → base → buttons → layout → progress → welcome →
   specialist card → booking modal (shell, loading, picker, confirmation).
   ============================================================================ */

/* ── Design tokens ──────────────────────────────────────────────────────────
   Nordhealth tokens lifted from the prototype so the SSR portal matches the
   mock. Brand colour is injected per-request via --brand / --brand-light on
   <body> (see base.html), so this file stays brand-agnostic. */
:root {
  --n-color-text: rgb(12, 26, 61);
  --n-color-text-weak: rgb(54, 67, 74);
  --n-color-text-weaker: rgb(102, 118, 128);
  --n-color-text-weakest: rgb(178, 186, 191);
  --n-color-border: rgb(216, 222, 228);
  --n-color-surface: rgb(255, 255, 255);
  --n-color-background: rgb(250, 251, 251);
  --n-box-shadow-card: 0 0 0 1px rgb(216, 222, 228), 0 1px 5px rgba(12, 12, 12, 0.05), 0 0 40px rgba(12, 12, 12, 0.015);
  --n-font-family: 'Nordhealth Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* ── Base elements ──────────────────────────────────────────────────────────*/
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--n-font-family);
  background: var(--n-color-background);
  color: var(--n-color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); }
button { font-family: var(--n-font-family); }

/* ── Buttons (shared) ───────────────────────────────────────────────────────*/
.btn-primary {
  padding: 15px 32px; border-radius: 12px; border: none; background: var(--brand);
  color: #fff; font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
  display: inline-block; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent);
}
.btn-primary:disabled { opacity: .5; cursor: default; box-shadow: none; }

.btn-secondary {
  padding: 13px 22px; border-radius: 12px; background: #fff; color: var(--n-color-text-weak);
  border: 1px solid var(--n-color-border); font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; display: inline-block;
}

/* ── Wizard form steps ───────────────────────────────────────────────────────*/
.step-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.step-sub { color: var(--n-color-text-weaker); font-size: 14px; line-height: 1.6; margin: 0 0 20px; }

.card {
  background: #fff; border-radius: 12px; border: 1px solid var(--n-color-border);
  padding: 18px; margin-bottom: 16px;
}
.card-title { font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.card-sub { font-size: 12px; color: var(--n-color-text-weaker); margin: -8px 0 12px; }
details.card > summary { cursor: pointer; font-weight: 600; font-size: 13px; list-style: revert; }
details.card[open] > summary { margin-bottom: 6px; }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 12px; color: var(--n-color-text-weak); margin-bottom: 4px; font-weight: 500; }
.field .req { color: #EF4444; }
.field .hint { font-size: 11px; color: var(--n-color-text-weakest); margin-top: 4px; }
.input {
  width: 100%; border: 1px solid var(--n-color-border); border-radius: 8px;
  padding: 9px 11px; font-size: 13px; font-family: inherit; box-sizing: border-box;
}
/* The native chevron sits flush against the border; draw our own with an inset. */
select.input {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px; background-color: #fff; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2336434A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.input:disabled { background-color: rgb(241,243,245); }
.input-error { border-color: #EF4444; }
.field-error { font-size: 11px; color: #EF4444; margin-top: 4px; }
.logo-chosen { font-size: 11px; color: #10B981; margin-top: 4px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row-1-2 { grid-template-columns: 1fr 2fr; }
.field-row-2-1 { grid-template-columns: 2fr 1fr; }

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 12px;
  color: var(--n-color-text-weak); cursor: pointer; }

.form-error-summary {
  background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B;
  border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}

/* Setup template banner + country/template picker */
.setup-banner {
  display: flex; align-items: center; gap: 12px; background: var(--brand-light);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 14px;
}
.setup-eyebrow { font-size: 11px; color: var(--brand); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.setup-value { display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 14px; font-weight: 700; }
.setup-value .setup-sep { color: var(--n-color-text-weakest); }
.setup-value .muted { color: var(--n-color-text-weakest); font-weight: 500; }
.setup-note { font-size: 11px; color: var(--n-color-text-weaker); margin-top: 4px; line-height: 1.5; }

.wizard-footer {
  position: sticky; bottom: 0; z-index: 10;
  background: var(--n-color-surface); border-top: 1px solid var(--n-color-border);
  padding: 14px 24px;
}
.wizard-nav {
  max-width: 680px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.wizard-next { flex: 1; text-align: center; font-size: 12px; color: var(--n-color-text-weakest); }
.btn-save-exit {
  border-radius: 12px; cursor: pointer; font-weight: 600;
  background: var(--brand-light); color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
}
/* Footer buttons share one height (13px font, equal vertical padding + 1px
   border on all three, including the primary which is borderless elsewhere). */
.wizard-nav .btn-primary,
.wizard-nav .btn-secondary,
.wizard-nav .btn-save-exit {
  height: 39.5px; padding: 0 20px; font-size: 13px; border-width: 1px;
  display: inline-flex; align-items: center; justify-content: center;
}
.wizard-nav .btn-primary { border: 1px solid var(--brand); box-shadow: none; }
.autosave-status:not(:empty) {
  max-width: 680px; margin: 0 auto 8px; font-size: 12px;
  color: var(--n-color-text-weaker); text-align: center;
}

/* ── Layout shell ───────────────────────────────────────────────────────────*/
.portal-shell { min-height: 100vh; display: flex; flex-direction: column; }

.portal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; background: var(--n-color-surface);
  border-bottom: 1px solid var(--n-color-border);
}
.portal-logo {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.portal-brandname { font-size: 13px; font-weight: 700; color: var(--n-color-text); line-height: 1.1; }
.portal-tagline { font-size: 10px; color: var(--n-color-text-weakest); }
.portal-header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn-startover {
  padding: 6px 12px; border-radius: 8px; border: 1px solid rgb(254, 202, 202);
  background: #fff; color: rgb(185, 28, 28); font-size: 12px; font-weight: 600;
  cursor: pointer; text-decoration: none;
}

/* Phones: the two header buttons drop their labels and keep the icon, so the
   header stays one line and the sticky progress bar sits higher. The labels
   stay in the accessible name (aria-label) and the start-over tooltip. */
@media (max-width: 480px) {
  .portal-header-actions .header-action-label { display: none; }
  .support-toggle, .btn-startover {
    width: 38px; height: 38px; padding: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 17px;
  }
}

.portal-main { flex: 1; display: flex; justify-content: center; padding: 28px 16px 48px; }
.portal-card {
  width: 100%; max-width: 680px; margin: 0 auto;
}

/* ── Resume banner (shown when an in-progress session is picked up) ─────────*/
.resume-banner {
  background: var(--brand-light);
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  padding: 8px 24px; font-size: 12px; color: var(--brand);
  display: flex; align-items: center; gap: 10px;
}
.resume-banner span { flex: 1; }
.resume-banner-close {
  background: none; border: none; color: var(--brand); font-size: 14px; cursor: pointer;
}

/* ── Progress header (full-width bar below the app header) ──────────────────
   Sticky so the customer keeps sight of where they are on long steps; the
   z-index sits above the step content but below the booking modal. */
.progress-bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--n-color-surface); border-bottom: 1px solid var(--n-color-border);
  box-shadow: 0 2px 8px rgba(12, 26, 61, 0.06);
  padding: 14px 24px 12px;
}
.progress-inner { max-width: 680px; margin: 0 auto; }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 13px; font-weight: 600; color: var(--n-color-text); margin-bottom: 8px; }
.progress-percent { color: var(--brand); font-weight: 700; white-space: nowrap; }
.progress-track { height: 10px; border-radius: 999px; background: rgb(233, 236, 239);
  overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s; }
.progress-dots { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.progress-dot { width: 10px; height: 10px; border-radius: 50%;
  background: var(--n-color-border); transition: background .3s, transform .3s; }
.progress-dot.is-done { background: rgb(34, 197, 94); }
.progress-dot.is-current { background: var(--brand); transform: scale(1.3);
  box-shadow: 0 0 0 3px var(--brand-light); }

/* ── Welcome step ───────────────────────────────────────────────────────────*/
.welcome { text-align: center; padding: 24px 0; }
.welcome-eyebrow { font-size: 14px; color: var(--n-color-text-weaker); margin-bottom: 6px; font-weight: 500; }
.welcome-hero {
  max-width: 480px; margin: 0 auto 24px; padding: 30px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 87%, black) 100%);
  color: #fff; box-shadow: 0 8px 32px color-mix(in srgb, var(--brand) 30%, transparent);
}
.welcome-hero-name { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.welcome-hero-sub { font-size: 15px; opacity: .85; }

.welcome-blurb { color: var(--n-color-text-weaker); max-width: 440px; margin: 0 auto 24px;
  line-height: 1.7; font-size: 14px; }

.welcome-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  max-width: 480px; margin: 0 auto 28px; }
.welcome-tile { background: #fff; border-radius: 12px; padding: 14px 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08); border: 1px solid rgb(241,243,245); text-align: center; }
.welcome-tile-icon { font-size: 22px; margin-bottom: 4px; }
.welcome-tile-label { font-size: 10px; color: #4B5563; font-weight: 500; line-height: 1.3; }

/* ── Specialist card ────────────────────────────────────────────────────────*/
.onboarder-card {
  max-width: 480px; margin: 0 auto 24px; background: #fff; border-radius: 14px;
  border: 1px solid var(--n-color-border); padding: 16px; display: flex; align-items: center;
  gap: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); text-align: left;
}
.onboarder-avatar { width: 56px; height: 56px; flex-shrink: 0; position: relative; }
.onboarder-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  display: block; border: 2px solid var(--brand-light); }
.onboarder-initials { width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand); place-items: center;
  display: grid; font-weight: 700; font-size: 18px; }
.onboarder-silhouette { width: 56px; height: 56px; display: block; }
.onboarder-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.onboarder-title { font-size: 12px; color: var(--n-color-text-weaker); margin-bottom: 8px; }
.onboarder-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.onboarder-chip {
  font-size: 11px; padding: 4px 10px; border-radius: 20px;
  background: var(--brand-light); color: var(--brand); font-weight: 600; text-decoration: none;
}
button.onboarder-chip { border: none; cursor: pointer; font-family: inherit; }

/* ── Header "Need help?" widget (drops down; never overlaps the footer nav) ──*/
.support-widget { position: relative; }
.support-toggle {
  display: inline-flex; align-items: center; gap: 6px; border: none; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 13px; padding: 8px 14px;
  border-radius: 20px; color: #fff; background: var(--brand);
}
.support-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70;
  width: 300px; max-width: calc(100vw - 32px); background: #fff;
  border: 1px solid var(--n-color-border); border-radius: 14px; padding: 16px;
  box-shadow: 0 8px 28px rgba(12, 26, 61, .18); text-align: left;
}
.support-panel[hidden] { display: none; }
.support-panel-title { font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.support-panel-body { display: flex; align-items: center; gap: 14px; }

/* ── Booking modal: shell ───────────────────────────────────────────────────*/
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(12, 26, 61, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(12, 12, 12, .25);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--n-color-border);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close {
  border: none; background: none; font-size: 24px; line-height: 1; cursor: pointer;
  color: var(--n-color-text-weaker); padding: 0 4px;
}
.modal-body { padding: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.modal-actions .btn-primary,
.modal-actions .btn-secondary {
  padding: 8px 16px; font-size: 13px; border-radius: 10px; box-shadow: none;
}
.modal-note { color: var(--n-color-text-weaker); font-size: 14px; text-align: center; margin: 20px 0; }

/* ── Booking modal: loading ─────────────────────────────────────────────────*/
.modal-loading { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 0; }
.modal-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--brand-light); border-top-color: var(--brand);
  animation: modal-spin .7s linear infinite;
}
@keyframes modal-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .modal-spinner { animation-duration: 1.8s; } }

/* ── Booking modal: day & time picker ───────────────────────────────────────*/
.book-days { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.book-day {
  flex: 0 0 auto; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--n-color-border); background: #fff; font-size: 13px;
  font-weight: 600; color: var(--n-color-text-weak); white-space: nowrap;
}
.book-day.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

.book-times {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px;
}
.book-time {
  padding: 10px 6px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600;
  border: 1px solid var(--n-color-border); background: #fff; color: var(--n-color-text-weak);
}
.book-time.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

.book-confirm { width: 100%; text-align: center; font-size: 14px; padding: 13px 16px; }

/* ── Booking modal: confirmation ────────────────────────────────────────────*/
.book-done { text-align: center; padding: 8px 0; }
.book-done-icon { font-size: 40px; margin-bottom: 8px; }
.book-done h4 { margin: 0 0 10px; font-size: 18px; }
.book-done .btn-primary { margin: 6px 0 10px; }

.book-link {
  display: flex; align-items: center; gap: 8px; margin: 0 auto 14px; max-width: 360px;
  padding: 8px 8px 8px 12px; border: 1px solid var(--n-color-border); border-radius: 10px;
  background: var(--n-color-background);
}
.book-link-url {
  flex: 1; min-width: 0; font-size: 12px; color: var(--n-color-text-weak);
  text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.book-link-copy {
  flex: 0 0 auto; border: none; cursor: pointer; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 8px; background: var(--brand-light); color: var(--brand);
}
.book-link-copy.is-copied { background: var(--brand); color: #fff; }

.book-reason { margin: 2px 0 12px; resize: vertical; font-family: inherit; }
.booking-note-label { display: block; font-size: 12px; font-weight: 500;
  color: var(--n-color-text-weak); margin: 10px 0 4px; }

/* ── Your Team step ─────────────────────────────────────────────────────────*/
.scrape-banner {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  padding: 12px 14px; border-radius: 10px; font-size: 13px;
  background: var(--brand-light); color: var(--brand);
}
/* Empty result / error / timeout: show a note in place of the spinner. */
.scrape-banner.is-note .spinner { display: none; }
.scrape-banner.is-done { background: rgba(34, 197, 94, .12); color: rgb(21, 128, 61); }
.scrape-banner .spinner {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--brand-light); border-top-color: var(--brand);
  animation: modal-spin .7s linear infinite;
}
.scrape-banner.is-done .spinner { display: none; }

[data-tm-add] {
  /* min-width, not width: translated labels run longer than the English the
     168px was sized for — the button grows instead of wrapping. */
  min-width: 168px; height: 35px; padding: 0 16px; font-size: 13px;
  box-shadow: none; border-radius: 8px; white-space: nowrap;
}

/* ── A Typical Day step ─────────────────────────────────────────────────────*/
.tip-box {
  background: var(--brand-light); color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px;
  font-size: 13px; line-height: 1.5;
}

.summary-box {
  margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: var(--brand-light); color: var(--brand);
  font-size: 13px; line-height: 1.6;
}

/* ── Bringing Your Data Across step ─────────────────────────────────────────*/
.ds-source {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--n-color-border);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 14px;
}
.ds-source-text { flex: 1; min-width: 0; }
.ds-source-name { font-size: 13px; font-weight: 600; color: var(--n-color-text); }
.ds-source-scope { font-size: 11px; color: var(--n-color-text-weaker); margin-top: 2px; }
.pms-logo {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}

/* "Selected" badge on the items select-cards (shown only when checked) */
.select-badge {
  display: none; font-size: 10px; font-weight: 600; margin-left: 8px;
  background: var(--brand); color: #fff; padding: 2px 8px; border-radius: 10px;
}
.select-card input:checked ~ .select-card-text .select-badge { display: inline-block; }

/* The data-step picker is full-width and uses flat gray pills (prototype look),
   distinct from the Welcome modal's bordered buttons. Both day rows wrap. */
[data-booking-picker] .book-days { gap: 6px; }
[data-booking-picker] .book-times { display: flex; flex-wrap: wrap; gap: 6px; }
[data-booking-picker] .book-day,
[data-booking-picker] .book-time {
  border: none; border-radius: 8px; background: rgb(241, 243, 245);
  color: var(--n-color-text-weak); font-size: 12px; font-weight: 400;
}
[data-booking-picker] .book-day { padding: 8px 12px; min-width: 92px; text-align: center; }
[data-booking-picker] .book-time { padding: 8px 14px; }
[data-booking-picker] .book-day.is-active,
[data-booking-picker] .book-time.is-active {
  background: var(--brand); color: #fff; font-weight: 600;
}
/* Go-Live Date calendar: the weeks of the 2–4 week window, prototype look. */
.gl-cal { margin-top: 4px; border: 1px solid var(--n-color-border); border-radius: 12px; padding: 12px; }
.gl-window { font-size: 13px; color: var(--n-color-text-weak); margin-bottom: 10px; }
.gl-dow, .gl-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.gl-dow div {
  text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--n-color-text-weakest); padding-bottom: 6px;
}
.gl-day {
  aspect-ratio: 1 / 1; max-height: 52px; width: 100%; min-width: 0; padding: 0;
  border: 1px solid transparent; border-radius: 10px; background: transparent;
  font-size: 14px; font-variant-numeric: tabular-nums; color: var(--n-color-text-weakest);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  cursor: not-allowed;
}
.gl-day small { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.gl-day.is-open { background: var(--brand-light); color: var(--n-color-text); cursor: pointer; }
.gl-day.is-open:hover, .gl-day.is-selected { border-color: var(--brand); }
.gl-day.is-chosen { background: var(--brand); color: #fff; font-weight: 700; }
.gl-legend {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px;
  font-size: 11px; color: var(--n-color-text-weaker);
}
.gl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gl-swatch {
  width: 12px; height: 12px; border-radius: 4px; display: inline-block;
  border: 1px solid var(--n-color-border);
}
.gl-swatch-open { background: var(--brand-light); border-color: transparent; }
.gl-swatch-chosen { background: var(--brand); border-color: transparent; }
.gl-times { margin-top: 14px; }
.gl-times .book-times { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0; }
.gl-times .book-time {
  border: none; border-radius: 8px; background: rgb(241, 243, 245);
  font-size: 12px; font-weight: 400; padding: 8px 14px;
}
.gl-times .book-time.is-active { background: var(--brand); color: #fff; font-weight: 600; }
.gl-held { margin-top: 14px; }
.gl-help-link {
  border: none; background: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--brand); text-decoration: underline;
}

.book-times-label { font-weight: 600; font-size: 13px; color: var(--n-color-text-weak); margin-bottom: 8px; }
.booking-status { color: var(--n-color-text-weaker); font-size: 13px; margin: 4px 0; }

/* Held (not-yet-booked) slot — amber, matching the prototype. */
.booking-held {
  padding: 12px 16px; border-radius: 10px;
  background: rgb(255, 250, 225); border: 1px solid rgb(248, 216, 124);
  color: rgb(120, 53, 15); font-size: 13px; line-height: 1.6;
}
.booking-held-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.booking-held-note { margin-bottom: 10px; }
.booking-change {
  border: none; background: none; cursor: pointer; padding: 0;
  font-size: 13px; color: rgb(120, 53, 15); text-decoration: underline;
}

.day-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.day-toggle { cursor: pointer; }
.day-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.day-toggle span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 10px 6px; border-radius: 10px;
  background: rgb(241, 243, 245); color: var(--n-color-text-weak);
  font-size: 13px; transition: background .12s, color .12s;
}
.day-toggle input:checked + span { background: var(--brand); color: #fff; font-weight: 600; }
.day-toggle input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-light); }

.time-row { display: flex; align-items: flex-end; gap: 12px; }
.time-row[hidden] { display: none; }
.time-row .field { margin-bottom: 0; }
.time-row .input { width: auto; }
.time-sep { color: var(--n-color-text-weakest); font-size: 18px; padding-bottom: 9px; }

/* Opening hours: uniform/per-day header, lunch closure, and per-day rows */
.hours-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hours-uniform { white-space: nowrap; }
.lunch-row { margin-top: 12px; }
.lunch-row .time-row { margin-top: 8px; }
.day-hours-row { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--n-color-border); }
.day-hours-row:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.day-hours-name { font-size: 13px; font-weight: 600; color: var(--n-color-text); margin-bottom: 8px; }
.day-hours-row .lunch-row { margin-top: 8px; }

.select-cards { display: flex; flex-direction: column; gap: 8px; }
.select-card {
  display: flex; align-items: flex-start; gap: 14px; cursor: pointer;
  padding: 14px 16px; border-radius: 12px; border: 2px solid var(--n-color-border);
  background: #fff; transition: border-color .12s, box-shadow .12s, background .12s;
}
.select-card:hover { border-color: var(--brand); }
.select-card input { position: absolute; opacity: 0; pointer-events: none; }
.select-card-icon { font-size: 26px; flex: 0 0 auto; line-height: 1.1; }
.select-card-text { display: flex; flex-direction: column; gap: 4px; }
.select-card-label { font-weight: 600; font-size: 14px; color: var(--n-color-text); }
.select-card-desc { font-size: 13px; line-height: 1.5; color: var(--n-color-text-weaker); }
.select-card input:checked ~ .select-card-text .select-card-label { color: var(--brand); }
.select-card:has(input:checked) {
  border-color: var(--brand); background: var(--brand-light);
}
.select-card:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--brand-light); }

textarea.input { resize: vertical; line-height: 1.6; font-family: inherit; }

.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--n-color-border); background: var(--n-color-background);
}
.team-row.is-clickable { cursor: pointer; transition: border-color .12s, background .12s; }
.team-row.is-clickable:hover { border-color: var(--brand); background: #fff; }
.team-row.is-clickable:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.team-row-info { flex: 1; min-width: 0; }
.team-row-name {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-weight: 600; font-size: 13px; color: var(--n-color-text);
}
.team-row-meta { font-size: 12px; color: var(--n-color-text-weaker); margin-top: 2px; }
.team-row-warn { color: rgb(239, 68, 68); font-weight: 600; }
.team-row-remove {
  flex: 0 0 auto; border: none; background: none; cursor: pointer;
  color: rgb(239, 68, 68); font-size: 16px; padding: 4px 8px; line-height: 1;
}
.team-row-locked {
  flex: 0 0 auto; font-size: 13px; padding: 4px 8px; line-height: 1;
  color: var(--n-color-text-weakest); cursor: default;
}

/* Instant CSS tooltip (the native title= has a ~1s browser delay). */
.has-tooltip { position: relative; }
.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); right: 0;
  white-space: nowrap; padding: 8px 12px; border-radius: 8px;
  background: var(--n-color-text); color: #fff; font-size: 14px; line-height: 1.3;
  opacity: 0; visibility: hidden; transition: opacity .1s; pointer-events: none; z-index: 60;
}
.has-tooltip:hover::after, .has-tooltip:focus-visible::after { opacity: 1; visibility: visible; }
.team-badge { font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.team-badge.badge-lead { background: var(--brand); color: #fff; }
.team-badge.badge-web { background: rgb(255, 247, 237); color: rgb(180, 83, 9); }

.info-box {
  padding: 14px 16px; border-radius: 10px; font-size: 13px; line-height: 1.5;
  background: rgb(255, 247, 237); color: var(--n-color-text-weak);
}

/* ── Equipment step ─────────────────────────────────────────────────────────*/
.eq-providers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.eq-provider {
  position: relative; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 8px; text-align: center;
  padding: 14px 10px; border-radius: 12px; border: 2px solid var(--n-color-border);
  background: #fff; transition: border-color .12s, background .12s;
}
.eq-provider input { position: absolute; opacity: 0; pointer-events: none; }
.eq-provider:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
.eq-provider:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--brand-light); }
.eq-provider-logo {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.eq-provider-img {
  width: 44px; height: 44px; border-radius: 10px; object-fit: contain;
  background: #fff; border: 1px solid rgb(241, 243, 245); padding: 4px; box-sizing: border-box;
}
.eq-provider-letter {
  display: none; width: 100%; height: 100%; border-radius: 10px;
  align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px;
}
/* Set by JS when the favicon(s) fail to load → coloured first-letter tile. */
.eq-provider-logo.is-letter .eq-provider-img { display: none; }
.eq-provider-logo.is-letter .eq-provider-letter { display: flex; }
.eq-provider-label { font-size: 12px; font-weight: 600; color: var(--n-color-text); }
.eq-check {
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 11px; display: none;
  align-items: center; justify-content: center;
}
.eq-provider:has(input:checked) .eq-check { display: flex; }

.eq-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eq-tile {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; border: 2px solid var(--n-color-border);
  background: #fff; transition: border-color .12s, background .12s;
}
.eq-tile input { position: absolute; opacity: 0; pointer-events: none; }
.eq-tile:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
.eq-tile:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--brand-light); }
.eq-tile-row { width: 100%; }
.eq-check-sq {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid rgb(209, 213, 219); background: #fff;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px;
}
.eq-tile:has(input:checked) .eq-check-sq { border-color: var(--brand); background: var(--brand); }
.eq-tile:has(input:checked) .eq-check-sq::after { content: "✓"; }
.eq-tile-text { display: flex; flex-direction: column; }
.eq-tile-label { font-size: 13px; font-weight: 500; color: var(--n-color-text); }
.eq-tile-sub { font-size: 11px; color: var(--n-color-text-weakest); }

.eq-subcard {
  padding: 14px 16px; border-radius: 10px; margin: 12px 0;
  background: var(--n-color-background); border: 1px solid var(--n-color-border);
}

/* Equipment — integration call card */
.eq-integration { border: 2px solid var(--brand); }
.eq-integration-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--n-color-text); margin-bottom: 12px;
}
.eq-integration-icon { font-size: 22px; }

/* ── Review step ─────────────────────────────────────────────────────────────*/
.review-head { text-align: center; margin-bottom: 24px; }
.review-head-icon { font-size: 44px; margin-bottom: 8px; }
.review-groups { display: flex; flex-direction: column; gap: 12px; }
.review-group {
  background: #fff; border: 1px solid var(--n-color-border); border-radius: 12px;
  padding: 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.review-group-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px;
}
.review-count {
  flex: 0 0 auto; align-self: center;
  padding: 2px 8px; border-radius: 10px;
  background: var(--brand-light); color: var(--brand);
  font-size: 11px; font-weight: 600; line-height: 1.5;
}
.review-change {
  font-size: 12px; font-weight: 600; color: var(--brand);
  text-transform: none; letter-spacing: 0;
}
.review-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.review-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--n-color-border);
  font-size: 13px; color: var(--n-color-text);
}
.review-pill .muted { color: var(--n-color-text-weakest); }
.review-lead {
  margin-left: 4px; font-size: 10px; background: var(--brand); color: #fff;
  padding: 1px 6px; border-radius: 8px;
}
.review-pms {
  width: 18px; height: 18px; border-radius: 5px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px;
}
.review-kv { font-size: 12px; color: var(--n-color-text-weak); margin-bottom: 4px; }
.review-kv span { color: var(--n-color-text-weakest); }
.review-empty { font-size: 13px; color: var(--n-color-text-weakest); }

.review-calls {
  background: rgb(240, 244, 255); border: 1px solid rgb(198, 212, 249);
  border-radius: 12px; padding: 18px 20px;
}
.review-call { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.review-call-icon { font-size: 22px; flex: 0 0 auto; }
.review-call-label { font-size: 13px; color: var(--n-color-text-weaker); margin-bottom: 2px; }
.review-call-when { font-size: 15px; font-weight: 700; color: var(--n-color-text); }
.review-call-note { font-size: 11px; color: var(--n-color-text-weaker); line-height: 1.5; }

.review-cta {
  margin-top: 20px; padding: 22px; border-radius: 14px;
  background: var(--brand); color: #fff; text-align: center;
}
.review-cta-title { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.review-cta-sub { font-size: 13px; opacity: .88; margin-bottom: 16px; line-height: 1.5; }
.review-cta-btn {
  display: inline-block; padding: 12px 32px; border-radius: 12px; border: none;
  background: #fff; color: var(--brand); font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.review-cta-btn.is-loading { opacity: .9; cursor: default; }
/* Spinner shown while the submit (book held calls + finalize) is in flight. */
.review-spinner {
  display: inline-block; width: 15px; height: 15px; vertical-align: -2px;
  margin-right: 8px; border: 2px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-top-color: var(--brand); border-radius: 50%;
  animation: review-spin .7s linear infinite;
}
@keyframes review-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .review-spinner { animation: none; } }

/* ── Configuration (terminal) step ──────────────────────────────────────────*/
/* Cosmetic "crafting…" staging panel (configuration.js) — pulsing orb core. */
.config-staging { text-align: center; padding: 16px 0; }
.config-stage-core {
  position: absolute; inset: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 44px;
  background: linear-gradient(135deg, var(--brand-light) 0%, #fff 100%);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  animation: config-pulse 2.4s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes config-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 35%, transparent); }
  70% { box-shadow: 0 0 0 22px color-mix(in srgb, var(--brand) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 0%, transparent); }
}
.config-fade { animation: config-fade-in .4s ease-out both; }
@keyframes config-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .config-stage-core { animation: none; } }

.config-hero { text-align: center; padding: 16px 0 8px; }
.config-orb { position: relative; width: 140px; height: 140px; margin: 0 auto 22px; }
.config-ring { position: absolute; inset: 0; animation: config-spin 8s linear infinite; }
.config-core {
  position: absolute; inset: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 48px;
  background: #ECFDF5; border: 1px solid #BBF7D0;
  animation: config-float 3.6s ease-in-out infinite;
}
@keyframes config-spin { to { transform: rotate(360deg); } }
@keyframes config-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .config-ring, .config-core { animation: none; } }
.config-title { font-size: 26px; font-weight: 700; margin: 0 0 8px; letter-spacing: -.01em; }
.config-sub {
  font-size: 15px; color: var(--n-color-text-weak); line-height: 1.65;
  max-width: 500px; margin: 0 auto 24px;
}
/* "You can leave" reassurance — the setup runs in the background */
.config-reassure {
  max-width: 520px; margin: 0 auto 18px; padding: 14px 18px;
  background: var(--brand-light); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: 12px; display: flex; align-items: flex-start; gap: 12px;
  text-align: left; font-size: 13px; line-height: 1.55; color: var(--n-color-text);
}
.config-reassure-icon { font-size: 18px; flex: 0 0 auto; line-height: 1.4; }
.config-golive { background: #fff; border: 2px solid var(--brand); font-size: 14px; }

.config-card {
  max-width: 520px; margin: 0 auto 18px; padding: 18px 22px;
  background: #fff; border: 1px solid var(--n-color-border); border-radius: 12px;
  box-shadow: 0 1px 5px rgba(12, 12, 12, .05); text-align: left;
}
.config-card-title {
  font-size: 11px; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px;
}
.config-inbox { display: flex; flex-direction: column; gap: 10px; }
.config-inbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--n-color-text-weak); line-height: 1.55;
}
.config-inbox-row strong { color: var(--n-color-text); }
.config-inbox-icon { font-size: 16px; flex: 0 0 auto; margin-top: 1px; }
/* Booked-calls card uses the blue accent (and keeps config-card's 18px gap). */
.config-calls { background: rgb(240, 244, 255); border-color: rgb(198, 212, 249); box-shadow: none; }
.config-meet {
  display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600;
  color: var(--brand); text-decoration: none;
}

/* Configuration — booked-call prep, task list, onboarder, note */
.config-call { padding: 12px 0 0; }
.config-call:first-of-type { padding-top: 0; }
.config-call-head { display: flex; gap: 10px; align-items: flex-start; }
.config-call-icon { font-size: 20px; flex: 0 0 auto; }
.config-call-label { font-size: 12px; color: var(--n-color-text-weaker); }
.config-call-when { font-size: 15px; font-weight: 700; color: var(--n-color-text); }
.config-call-prep {
  font-size: 12px; color: var(--n-color-text-weak); line-height: 1.6; margin: 6px 0 0 30px;
}
.config-tasks { display: flex; flex-direction: column; gap: 8px; }
.config-task {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px;
  border-radius: 10px; border: 1px solid rgb(241, 243, 245); background: var(--n-color-background);
}
.config-task-num {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; margin-top: 1px;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.config-task-body { flex: 1; min-width: 0; }
/* Hidden for now — the task rows aren't clickable yet, so the arrow is misleading. */
.config-task-arrow { display: none; flex: 0 0 auto; color: var(--n-color-text-weakest); font-size: 14px; }
.config-task-title { font-weight: 600; font-size: 13px; color: var(--n-color-text); }
.config-task-desc { font-size: 11px; color: var(--n-color-text-weaker); margin-top: 2px; line-height: 1.5; }

.config-onboarder {
  max-width: 520px; margin: 0 auto 16px; padding: 14px 18px;
  background: rgb(240, 244, 255); border: 1px solid rgb(198, 212, 249); border-radius: 12px;
  display: flex; align-items: center; gap: 12px; text-align: left;
  font-size: 13px; color: var(--n-color-text); line-height: 1.5;
}
.config-onboarder-photo {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 2px solid #fff;
}
.config-onboarder a { font-weight: 600; }

.config-note {
  max-width: 520px; margin: 0 auto; padding: 14px 18px;
  background: rgb(255, 250, 225); border: 1px solid rgb(248, 216, 124); border-radius: 12px;
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  font-size: 12px; color: rgb(51, 40, 16); line-height: 1.55;
}
.config-note-icon { font-size: 20px; flex: 0 0 auto; }

/* ── Enterprise flow (/e/) ──────────────────────────────────────────────────*/
.section-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.section-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--n-color-border); border-radius: 10px; background: #fff;
  color: inherit; text-decoration: none;
}
.section-row:hover { border-color: var(--brand); }
.section-row-title { flex: 1; min-width: 0; font-weight: 600; }
.section-row-arrow { color: var(--n-color-text-weakest); }
.section-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-head .step-title { margin-right: auto; }
.status-badge {
  flex: 0 0 auto; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.status-todo { background: var(--brand-light); color: var(--brand); }
.status-sent-back { background: rgb(255, 237, 213); color: rgb(154, 52, 18); }
.status-submitted { background: rgb(219, 234, 254); color: rgb(30, 64, 175); }
.status-approved { background: rgb(220, 252, 231); color: rgb(22, 101, 52); }
.back-link {
  display: inline-block; margin-bottom: 12px; font-size: 13px;
  color: var(--n-color-text-weak); text-decoration: none;
}
.sent-back-note { margin-top: 4px; white-space: pre-line; }
.enterprise-step .info-box { margin-bottom: 16px; }
.kv-list { margin: 0; display: grid; gap: 10px; }
.kv-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; }
.kv-row dt { color: var(--n-color-text-weak); font-size: 13px; }
.kv-row dd { margin: 0; overflow-wrap: anywhere; }
.kv-row dd.multiline { white-space: pre-wrap; }
@media (max-width: 480px) {
  .kv-row { grid-template-columns: 1fr; gap: 2px; }
}
