/* =============================================================================
 * unified-booking.css
 *
 * Shared booking-page styling for the unified booking theme. Imports the CWH
 * brand palette and uses brand tokens directly — colours and fonts are no
 * longer customisable per group, so the booking page reads the same way for
 * every customer regardless of which group's URL they arrive on.
 *
 * Three high-level surfaces define every booking page:
 *   1. .cwh-booking-banner       — dark-blue program-title hero (heading + sub)
 *   2. #progressbar              — circle-based step indicator with check-marks
 *   3. .cwh-booking-card         — white rounded card that holds step content
 * ============================================================================= */

@import url('brandingPalette.css');

/* ---- Body / containers ---------------------------------------------------- */

body.bookingFormTemplateFont,
.bookingFormTemplateFont {
    font-family: var(--cwh-font-family);
    color: var(--cwh-dark-grey);
}

/* Sticky-footer pattern: body is a vertical flex column that fills the
 * viewport, the booking-content area expands to absorb spare vertical
 * space, and the shared footer naturally lands at the bottom of the
 * viewport when steps are short — and just below the card when steps
 * are tall enough to require scrolling. */
body.bookingFormTemplateFont {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}
body.bookingFormTemplateFont #layout-wrapper,
body.bookingFormTemplateFont #layout-wrapper > .main-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

#body-Booking {
    background: #f5f7fa;
    flex: 1 0 auto;
    /* Override the legacy 1440px cap from booking-pharmacy.css so the
     * step-indicator strip and banner span the full page width. The booking
     * card inside has its own max-width that keeps the form readable. */
    max-width: none;
    margin: 0;
}

.bookingFormTemplateFont h1,
.bookingFormTemplateFont h2,
.bookingFormTemplateFont h3,
.bookingFormTemplateFont h4,
.bookingFormTemplateFont h5 {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
}

.bookingFormTemplateFont span,
.bookingFormTemplateFont label,
.bookingFormTemplateFont p {
    font-family: var(--cwh-font-family);
}

/* ---- Header strip (head-office-style dark-blue topbar) -------------------- */
/*
 * Mirrors the secure/ (head office) portal topbar so the booking pages share
 * its chrome. The customer-facing variant swaps LOGOUT for SIGN UP — class
 * names stay aligned with the operator portal so a single set of brand rules
 * styles both surfaces.
 */

#page-topbar {
    height: 80px;
    background: var(--cwh-dark-blue);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.cw-topbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.cw-topbar-logo:hover {
    text-decoration: none;
}

.cw-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.cw-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cw-logout-btn {
    background: rgba(255, 255, 255, 0.15);
    color: var(--cwh-white);
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 10px;
    padding: 8px 18px;
    font-family: var(--cwh-font-family);
    font-size: 12px;
    font-weight: var(--cwh-font-medium);
    text-decoration: none;
    letter-spacing: 0.04em;
    display: inline-block;
    transition: background 0.15s ease;
}

.cw-logout-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: var(--cwh-white);
    text-decoration: none;
}

/* ---- Program-title banner (the dark-blue hero) ---------------------------- */

.cwh-booking-banner {
    background: var(--cwh-dark-blue);
    color: var(--cwh-white);
    padding: 28px 24px;
    text-align: center;
    font-family: var(--cwh-font-family);
}

.cwh-booking-banner__title {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-white);
    font-size: 24px;
    line-height: 1.25;
    margin: 0;
}

.cwh-booking-banner__subtitle {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    color: var(--cwh-white);
    opacity: 0.85;
    font-size: 14px;
    margin: 6px 0 0 0;
}

.cwh-booking-banner__phone {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    color: var(--cwh-white);
    font-size: 13px;
    margin-top: 6px;
}

/* ---- Step indicator (circle + connector line) ----------------------------- */
/*
 * Uses CSS :has() to mark every <li> that precedes the current .active <li>
 * as "completed" so we can render a green tick without touching the JS that
 * toggles .active on bookingTabs. Browsers without :has() (very old) fall
 * back to plain numbered circles which is still functional.
 */

.cwh-step-indicator-wrap {
    background: var(--cwh-white);
    padding: 32px 24px 0 24px;
    border-bottom: 1px solid var(--cwh-border);
    /* Sticky just below the 80px-tall #page-topbar so the customer can always
     * see which step they're on while scrolling through long forms. z-index
     * sits under the topbar (100) and the global modal-loading scrim. */
    position: sticky;
    top: 80px;
    z-index: 90;
    box-shadow: 0 6px 14px -10px rgba(0, 51, 126, 0.18);
    transition: padding 0.28s ease;
}

#progressbar.nav.pharmacyTabs.nav-tabs,
ul#progressbar {
    display: flex;
    list-style: none;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    margin: 0 auto;
    max-width: 1100px;
    width: 100%;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
}

#progressbar li,
#progressbar li.bookingTabs {
    list-style: none;
    flex: 1 1 0;
    position: relative;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    text-align: center;
    color: var(--cwh-dark-grey);
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    font-size: 13px;
    text-transform: none;
}

#progressbar li > a,
#progressbar li.bookingTabs > a.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 4px 18px 4px;
    background: transparent;
    border: none;
    color: inherit;
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    text-decoration: none;
    cursor: default;
    transition: padding-bottom 0.28s ease, gap 0.28s ease;
}

/* Steps the user has visited become clickable so they can jump back (or
 * forward up to the furthest-reached step). The active step and any step
 * the user hasn't reached yet keep `cursor: default` and the inline click
 * handler (`bookingStepClick`) early-returns for them. */
#progressbar li.is-completed > a,
#progressbar li.bookingTabs.is-completed > a.nav-link,
#progressbar li.is-in-progress > a,
#progressbar li.bookingTabs.is-in-progress > a.nav-link {
    cursor: pointer;
}

/* Connector line drawn between circles via the <li> ::before pseudo.
 *
 * The line is inset 20px from each <li>'s horizontal center so it stops just
 * outside the 32px circle (16px radius + 4px active-state box-shadow halo)
 * rather than passing through the circle or visibly bleeding through the
 * halo's translucent ring on hover/click. The line is z-index:0, the
 * circle's ::before is z-index:1 with an opaque fill, but the halo is part
 * of the circle's box-shadow at 50% opacity — so without this gap the line
 * shows through the halo on the active step. */
#progressbar li::before {
    content: "";
    position: absolute;
    top: 16px;
    left: calc(-50% + 20px);
    right: calc(50% + 20px);
    height: 2px;
    background: var(--cwh-border);
    z-index: 0;
}

#progressbar li:first-child::before {
    display: none;
}

/* Circle (the step number / tick container). */
#progressbar li > a::before,
#progressbar li.bookingTabs > a.nav-link::before {
    content: counter(stepCounter);
    counter-increment: stepCounter;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cwh-white);
    border: 2px solid var(--cwh-border);
    color: var(--cwh-light-grey);
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    font-size: 13px;
    position: relative;
    z-index: 1;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#progressbar {
    counter-reset: stepCounter;
}

/* Step label sits below the circle. Rendered as two stacked <span>s — the
 * "Step X" prefix on top, the step name below — so the indicator strip reads
 * vertically rather than as a single squeezed line. */
#progressbar li > a > span,
#progressbar li.bookingTabs > a.nav-link > span {
    display: block;
    color: var(--cwh-light-grey);
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    font-size: 12px;
    line-height: 1.3;
    max-width: 110px;
    margin: 0 auto;
    transition: opacity 0.18s ease, max-height 0.28s ease;
}

#progressbar li > a > span.cwh-step-label__prefix,
#progressbar li.bookingTabs > a.nav-link > span.cwh-step-label__prefix {
    font-size: 10.5px;
    font-weight: var(--cwh-font-medium);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--cwh-mid-grey);
    margin-bottom: 1px;
}

/* The "Step N" prefix is generated by CSS so its numbering always matches
 * the circle. Both read the same `stepCounter` (declared on `#progressbar`,
 * incremented on each `<a>::before` circle), so Services becomes Step 3,
 * every later tab shifts up, and d-none tabs (the hidden Eligibility step)
 * are skipped automatically because their circle pseudo-element doesn't
 * render and therefore doesn't increment the counter. */
#progressbar li > a > span.cwh-step-label__prefix::before,
#progressbar li.bookingTabs > a.nav-link > span.cwh-step-label__prefix::before {
    content: "Step " counter(stepCounter);
}

#progressbar li > a > span.cwh-step-label__name,
#progressbar li.bookingTabs > a.nav-link > span.cwh-step-label__name {
    font-size: 12px;
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-grey);
}

#progressbar li.active > a > span.cwh-step-label__prefix,
#progressbar li.active.bookingTabs > a.nav-link > span.cwh-step-label__prefix {
    color: var(--cwh-middle-blue);
}

#progressbar li.active > a > span.cwh-step-label__name,
#progressbar li.active.bookingTabs > a.nav-link > span.cwh-step-label__name {
    color: var(--cwh-dark-blue);
}

#progressbar li.is-completed > a > span.cwh-step-label__prefix,
#progressbar li.bookingTabs.is-completed > a.nav-link > span.cwh-step-label__prefix,
#progressbar li.is-completed > a > span.cwh-step-label__name,
#progressbar li.bookingTabs.is-completed > a.nav-link > span.cwh-step-label__name,
#progressbar li.is-in-progress > a > span.cwh-step-label__prefix,
#progressbar li.bookingTabs.is-in-progress > a.nav-link > span.cwh-step-label__prefix,
#progressbar li.is-in-progress > a > span.cwh-step-label__name,
#progressbar li.bookingTabs.is-in-progress > a.nav-link > span.cwh-step-label__name {
    color: var(--cwh-dark-blue);
}

/* ── Active state ────────────────────────────────────────────────────────── */
#progressbar li.active > a::before,
#progressbar li.active.bookingTabs > a.nav-link::before {
    background: var(--cwh-middle-blue);
    border-color: var(--cwh-middle-blue);
    color: var(--cwh-white);
    /* Middle-blue halo at 50% opacity (--cwh-middle-blue is #3D96D9). */
    box-shadow: 0 0 0 4px rgba(61, 150, 217, 0.5);
}

#progressbar li.active > a > span,
#progressbar li.active.bookingTabs > a.nav-link > span {
    color: var(--cwh-dark-blue);
    font-weight: var(--cwh-font-bold);
}

/* Thick middle-blue underline beneath the active step's label, anchored to
 * the bottom of the wrap so it overlaps the wrap's 1px border. */
#progressbar li.active > a,
#progressbar li.active.bookingTabs > a.nav-link {
    border-bottom: 3px solid var(--cwh-middle-blue);
    margin-bottom: -1px;
}

/* ── Completed state (visited and passed) ────────────────────────────────── */
/* Completed steps stay in the CWH blue family — middle-blue circle with a
 * white tick. The halo is reserved for the active step only, so past steps
 * explicitly clear any inherited box-shadow.
 *
 * The `.bookingTabs > a.nav-link` variant is required because the base rule
 * carries those classes; without matching them the base white/grey circle
 * wins on specificity and past bubbles render uncoloured. */
#progressbar li.is-completed > a::before,
#progressbar li.bookingTabs.is-completed > a.nav-link::before {
    background: var(--cwh-middle-blue);
    border-color: var(--cwh-middle-blue);
    color: var(--cwh-white);
    content: "\2713"; /* check mark */
    box-shadow: none;
}

#progressbar li.is-completed > a > span,
#progressbar li.bookingTabs.is-completed > a.nav-link > span {
    color: var(--cwh-dark-blue);
}

#progressbar li.is-completed::before {
    background: var(--cwh-middle-blue);
}

/* Connector line *to* the active li uses the same middle-blue (left half). */
#progressbar li.active::before {
    background: var(--cwh-middle-blue);
}

/* ── In-progress state (furthest-reached step when user has gone back) ───── */
/* When the customer clicks a previous step in the indicator, the step they
 * were on stays marked as "in progress" rather than reverting to a future
 * (gray) circle. Number stays visible; middle-blue outline + middle-blue
 * number on a soft light-blue fill so it reads as distinct from both
 * `.active` (filled middle-blue with halo) and `.is-completed` (filled
 * middle-blue with tick). */
#progressbar li.is-in-progress > a::before,
#progressbar li.bookingTabs.is-in-progress > a.nav-link::before {
    background: var(--cwh-light-blue);
    border-color: var(--cwh-middle-blue);
    color: var(--cwh-middle-blue);
    box-shadow: none;
}

#progressbar li.is-in-progress > a > span,
#progressbar li.bookingTabs.is-in-progress > a.nav-link > span {
    color: var(--cwh-dark-blue);
}

/* Connector line into an in-progress step also uses middle-blue — the
 * customer crossed it on the way out before clicking back. */
#progressbar li.is-in-progress::before {
    background: var(--cwh-middle-blue);
}

/* ---- Compact (scrolled) header state ------------------------------------
 * Both #page-topbar and .cwh-step-indicator-wrap stay sticky and visible the
 * whole time. Once the customer scrolls past the enter threshold,
 * setupBookingHeaderScroll() in pharmacy.js adds .booking-header-compact to
 * <body> so the indicator strip tightens its padding and collapses its step
 * labels — only the step circles + active underline remain visible inside
 * the strip. Pages without an indicator strip (e.g. booking.w.php inside
 * the operator portal) inherit the body class as a no-op since the selectors
 * match nothing.
 */
body.booking-header-compact .cwh-step-indicator-wrap {
    padding-top: 14px;
}

body.booking-header-compact #progressbar li > a,
body.booking-header-compact #progressbar li.bookingTabs > a.nav-link {
    padding-bottom: 10px;
    gap: 4px;
}

body.booking-header-compact #progressbar li > a > span,
body.booking-header-compact #progressbar li.bookingTabs > a.nav-link > span {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
}

/* ---- Booking content card ------------------------------------------------- */

.cwh-booking-card {
    background: var(--cwh-white);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 51, 126, 0.08);
    padding: 48px 40px 32px 40px;
    margin: 24px auto;
    max-width: 1200px;
    font-family: var(--cwh-font-family);
}

.cwh-booking-card__title {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 20px;
    margin: 0 0 6px 0;
}

.cwh-booking-card__description {
    font-family: var(--cwh-font-family);
    color: var(--cwh-dark-grey);
    font-size: 14px;
    margin: 0 0 22px 0;
}

/* ---- Card header (heading / sub_heading / phone) -------------------------
 * Replaces the legacy dark-blue .cwh-booking-banner. Sits at the top of the
 * white card and pulls the booking-system identity inside the card surface.
 */

.cwh-booking-card__header {
    text-align: center;
    padding-bottom: 22px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--cwh-border);
}

.cwh-booking-card__header__title {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 26px;
    line-height: 1.2;
    margin: 0;
}

.cwh-booking-card__header__subtitle {
    font-family: var(--cwh-font-family);
    color: var(--cwh-dark-grey);
    font-size: 14px;
    line-height: 1.3;
    margin: 8px 0 0 0;
}

.cwh-booking-card__header__phone {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    color: var(--cwh-open-blue);
    font-size: 16px;
    margin-top: 12px;
}

/* Mandatory-fields note inside the card header — small, italic, middle-blue,
 * centered beneath the subtitle text. Rendered as a <span> inside the same
 * <p> as the subtitle, so display:block puts it on its own line with zero
 * inter-paragraph margin. The width/float resets undo the legacy
 * .mandatoryFieldsMessage rule from booking-pharmacy.css that floats this
 * to a 50% left column (irrelevant inside the new card header). */
.cwh-booking-card__header__mandatory,
.cwh-booking-card__header .mandatoryFieldsMessage {
    display: block;
    font-family: var(--cwh-font-family);
    font-style: italic;
    color: var(--cwh-middle-blue);
    font-size: 11px;
    font-weight: var(--cwh-font-medium);
    letter-spacing: 0.2px;
    text-align: center;
    line-height: 1.2;
    width: auto;
    float: none;
    margin: 2px 0 0 0;
}

/* ---- Running booking summary (foot of the card) --------------------------
 * Single progressive "booking so far" summary populated by
 * renderRunningBookingSummary() in pharmacy.js. Pinned to the bottom of the
 * card so it sits at the foot of every step page from the Services step
 * onwards; a tinted boxed panel that fills in with the picked services,
 * per-participant appointment time, and the chosen location/time as the
 * customer advances. It replaces the old per-step services-page table and is
 * the only summary in the flow — the per-service remove (×) controls are shown
 * on the Services step only. */
.cwh-booking-summary {
    text-align: left;
    /* Footer panel: a divider-style gap above it separates it from the step
     * content / nav buttons that precede it in the card. */
    margin-top: 26px;
    padding: 16px 18px;
    background: rgba(61, 150, 217, 0.06);
    border: 1px solid var(--cwh-border);
    border-radius: 12px;
    font-family: var(--cwh-font-family);
}

.cwh-booking-summary__empty {
    color: var(--cwh-dark-grey);
    font-size: 13px;
    font-style: italic;
    margin-top: 6px;
}

.cwh-booking-summary__label {
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.cwh-booking-summary__participant {
    padding: 10px 0;
    border-top: 1px solid var(--cwh-border);
}

.cwh-booking-summary__participant:first-of-type {
    border-top: none;
    padding-top: 0;
}

.cwh-booking-summary__participant-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.cwh-booking-summary__participant-name {
    font-weight: var(--cwh-font-medium);
    color: var(--cwh-dark-blue);
    font-size: 14px;
}

.cwh-booking-summary__participant-time {
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-open-blue);
    font-size: 13px;
    white-space: nowrap;
}

.cwh-booking-summary__services {
    list-style: none;
    margin: 6px 0 0 0;
    padding: 0;
}

.cwh-booking-summary__service {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--cwh-dark-grey);
    font-size: 13px;
    line-height: 1.5;
}

.cwh-booking-summary__service i {
    color: var(--cwh-middle-blue);
    font-size: 15px;
    flex-shrink: 0;
}

.cwh-booking-summary__service-name {
    flex: 1 1 auto;
}

/* Per-service remove control — Services step only (rendered by JS). Mirrors
 * the brand "remove" affordance: subtle by default, red on hover/focus. */
.cwh-booking-summary__remove {
    flex-shrink: 0;
    border: none;
    background: transparent;
    padding: 0;
    margin-left: 4px;
    line-height: 1;
    cursor: pointer;
    color: var(--cwh-light-grey);
    transition: color 0.15s ease-in-out;
}

.cwh-booking-summary__remove i {
    font-size: 18px;
    color: inherit;
}

.cwh-booking-summary__remove:hover,
.cwh-booking-summary__remove:focus {
    color: #d9534f;
}

.cwh-booking-summary__slot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 6px;
    color: var(--cwh-dark-grey);
    font-size: 13px;
}

.cwh-booking-summary__slot i {
    color: var(--cwh-middle-blue);
    font-size: 15px;
    flex-shrink: 0;
}

.cwh-booking-summary__slot-site {
    font-weight: var(--cwh-font-medium);
    color: var(--cwh-dark-blue);
}

.cwh-booking-summary__slot-sep {
    color: var(--cwh-light-grey);
}

.cwh-booking-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid var(--cwh-border);
}

.cwh-booking-summary__total-label {
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cwh-booking-summary__total-value {
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-open-blue);
    font-size: 15px;
}

/* ---- Separate-mode appointment cards -------------------------------------
 * When the party books separately each participant is their own appointment,
 * so the participant blocks become distinct cards (white surface, own border)
 * stacked with a gap, and each carries its own "Total appointment time" footer
 * (.cwh-booking-summary__card-total) instead of the shared booking-wide total. */
.cwh-booking-summary--separate .cwh-booking-summary__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cwh-booking-summary--separate .cwh-booking-summary__participant,
.cwh-booking-summary--separate .cwh-booking-summary__participant:first-of-type {
    border-top: none;
    padding: 14px 16px;
    background: var(--cwh-white);
    border: 1px solid var(--cwh-border);
    border-radius: 10px;
}

.cwh-booking-summary__card-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--cwh-border);
}

.cwh-booking-summary__card-total-label {
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cwh-booking-summary__card-total-value {
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-open-blue);
    font-size: 14px;
}

/* Make sure existing legacy markup inside the unified theme also benefits
 * from the card surface — keeps storebooking / walk-in chrome consistent. */
.bookingFormTemplateFont .bookingContainer {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* ---- Tabs container ------------------------------------------------------- */

.bookingFormTemplateFont .tab-content {
    background: transparent;
    padding: 0;
}

.bookingFormTemplateFont .tab-pane {
    display: none;
}

.bookingFormTemplateFont .tab-pane.active {
    display: block;
}

/* Strip Bootstrap's default nav-tabs underline so our circle indicator
 * is the only visual rhythm at the top of the card. */
#progressbar.nav-tabs {
    border-bottom: none;
}

/* ---- Action buttons (next / submit / confirm) ----------------------------- */

.action-button,
.btn-primary,
.swal2-confirm,
.btn-success {
    background-color: var(--cwh-dark-blue) !important;
    color:            var(--cwh-white)     !important;
    border-color:     var(--cwh-dark-blue) !important;
    font-family:      var(--cwh-font-family);
    font-weight:      var(--cwh-font-bold);
    border-radius:    10px !important;
    padding:          10px 22px !important;
}

.action-button:hover,
.btn-primary:hover,
.btn-success:hover {
    background-color: var(--cwh-open-blue) !important;
    border-color:     var(--cwh-open-blue) !important;
}

.action-button.availableSlotList,
.availableSlotList,
.action-button.changeTime {
    background:   var(--cwh-open-blue) !important;
    color:        var(--cwh-white)     !important;
    border-color: var(--cwh-open-blue) !important;
}

/* ---- Action buttons (previous / cancel / skip) ---------------------------- */

.action-button-previous,
.swal2-cancel,
.skipVerification {
    background:   var(--cwh-white)     !important;
    color:        var(--cwh-dark-blue) !important;
    border:       1px solid var(--cwh-border) !important;
    border-radius: 10px !important;
    font-family:   var(--cwh-font-family);
    font-weight:   var(--cwh-font-bold);
    padding:       10px 22px !important;
}

.action-button-previous:hover {
    background: var(--cwh-border) !important;
}

.skipVerification:hover,
.verifyMobile:hover {
    opacity: 0.8 !important;
}

/* ---- Sign-up / login button in header ------------------------------------- */

.login-button {
    background:    var(--cwh-dark-blue) !important;
    color:         var(--cwh-white)     !important;
    border-color:  var(--cwh-dark-blue) !important;
    font-family:   var(--cwh-font-family);
    font-weight:   var(--cwh-font-bold);
    border-radius: 999px;
    padding:       8px 18px;
    font-size:     13px;
    text-decoration: none;
    display: inline-block;
}

/* ---- Time-slot buttons (rendered into #storeLocation_TB) ------------------ */

.availableTimeSlots {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}

.availableTimeSlots > span {
    background: var(--cwh-white);
    border: 1px solid var(--cwh-border);
    border-radius: 10px;
    color: var(--cwh-dark-blue);
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    font-size: 13px;
    padding: 10px 6px;
    width: auto;
    margin: 0;
    cursor: pointer;
    text-align: center;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.availableTimeSlots > span:hover {
    border-color: var(--cwh-open-blue);
    color: var(--cwh-open-blue);
    opacity: 1;
}

.availableTimeSlots > span.activeslot,
.availableTimeSlots > span.selected {
    background: var(--cwh-dark-blue);
    border-color: var(--cwh-dark-blue);
    color: var(--cwh-white);
    opacity: 1;
}

@media (max-width: 992px) {
    .availableTimeSlots {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .availableTimeSlots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- Booking-for cards (step 2 entry choice) -----------------------------
 *
 * Modern, sleek picker that opens the participant step. Three brand-aligned
 * cards in a row, each with a square icon tile, a label, and a corner
 * checkmark that appears once selected. All states stay strictly inside the
 * CWH palette (dark-blue / middle-blue / light-blue / white / border).
 */

.cwh-bookingfor__question {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 15px;
    letter-spacing: 0.1px;
    margin-bottom: 14px;
}

.cwh-bookingfor {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

.cwh-bookingfor__card {
    position: relative;
    background: var(--cwh-white);
    border: 1.5px solid var(--cwh-border);
    border-radius: 16px;
    padding: 22px 18px 20px 18px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    font-family: var(--cwh-font-family);
    color: var(--cwh-dark-blue);
    font-weight: var(--cwh-font-medium);
    user-select: none;
    text-align: center;
    overflow: hidden;
}

/* Subtle top accent stripe — invisible until hover/selected. Adds a quiet
 * brand cue without ever dominating the card. */
.cwh-bookingfor__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cwh-middle-blue);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.cwh-bookingfor__card:hover {
    border-color: var(--cwh-middle-blue);
    box-shadow: 0 6px 20px rgba(0, 51, 126, 0.10);
    transform: translateY(-2px);
}

.cwh-bookingfor__card:hover::before {
    transform: scaleX(1);
}

.cwh-bookingfor__card:focus-visible {
    outline: none;
    border-color: var(--cwh-middle-blue);
    box-shadow: 0 0 0 3px rgba(61, 150, 217, 0.30);
}

.cwh-bookingfor__card.is-selected {
    border-color: var(--cwh-dark-blue);
    background: linear-gradient(180deg, rgba(153, 209, 250, 0.18) 0%, rgba(255, 255, 255, 1) 70%);
    box-shadow: 0 8px 24px rgba(0, 51, 126, 0.14);
}

.cwh-bookingfor__card.is-selected::before {
    background: var(--cwh-dark-blue);
    transform: scaleX(1);
}

/* Corner checkmark badge — only rendered for the selected card. */
.cwh-bookingfor__card.is-selected::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/14px no-repeat,
        var(--cwh-dark-blue);
    box-shadow: 0 2px 6px rgba(0, 51, 126, 0.30);
}

.cwh-bookingfor__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--cwh-light-blue);
    color: var(--cwh-dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

/* Explicit colour on the FA glyph itself — defeats the global icon-pack
 * color overrides shipped via icons.min.css. */
.cwh-bookingfor__icon i {
    color: var(--cwh-dark-blue) !important;
    transition: color .18s ease;
}

.cwh-bookingfor__card:hover .cwh-bookingfor__icon {
    transform: scale(1.04);
}

.cwh-bookingfor__card.is-selected .cwh-bookingfor__icon {
    background: var(--cwh-dark-blue);
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 51, 126, 0.20);
}

.cwh-bookingfor__card.is-selected .cwh-bookingfor__icon i {
    color: var(--cwh-light-blue) !important;
}

.cwh-bookingfor__label {
    font-size: 14px;
    font-weight: var(--cwh-font-bold);
    line-height: 1.3;
    letter-spacing: 0.1px;
    color: var(--cwh-dark-blue);
}

/* "Booking for myself" toggle inside the Your-details section (Multiple
 * mode only). Plain checkbox visually hidden + replaced by a track/thumb. */
.cwh-toggle-wrap {
    margin-top: 4px;
    margin-bottom: 18px;
}

.cwh-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    font-size: 13px;
    color: var(--cwh-dark-blue);
    margin: 0;
}

.cwh-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.cwh-toggle__track {
    position: relative;
    width: 38px;
    height: 22px;
    background: var(--cwh-light-grey);
    border-radius: 22px;
    transition: background .2s ease;
    flex-shrink: 0;
}

.cwh-toggle__track::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--cwh-white);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.20);
    transition: transform .2s ease;
}

.cwh-toggle input[type="checkbox"]:checked + .cwh-toggle__track {
    background: var(--cwh-middle-blue);
}

.cwh-toggle input[type="checkbox"]:checked + .cwh-toggle__track::before {
    transform: translateX(16px);
}

.cwh-toggle input[type="checkbox"]:focus-visible + .cwh-toggle__track {
    box-shadow: 0 0 0 3px rgba(61, 150, 217, 0.30);
}

.cwh-toggle__hint {
    font-family: var(--cwh-font-family);
    font-weight: 400;
    font-size: 11px;
    font-style: italic;
    color: var(--cwh-mid-grey);
    margin: 6px 0 0 50px;
}

/* Read-only patient input — used when "Booking for myself" syncs booker
 * values into patient 1, so the user can see (but not edit) the copied
 * name. */
#fname_1[readonly],
#sname_1[readonly] {
    background: rgba(0, 51, 126, 0.05);
    color: var(--cwh-dark-grey);
    cursor: not-allowed;
}

/* Override the legacy booking-pharmacy.css rule that applied a green
 * border (var(--cwh-success)) to focused #msform inputs — green isn't part of
 * the brand palette. Use middle-blue with a soft halo to match the rest
 * of the booking page's focus affordances. */
#msform input:focus,
#msform textarea:focus,
#msform select:focus {
    border-color: var(--cwh-middle-blue) !important;
    box-shadow: 0 0 0 3px rgba(61, 150, 217, 0.18) !important;
    outline: none !important;
}

/* Field labels in the booking wizard need a little breathing room above
 * their input so the form doesn't read as one squished block. Exclude the
 * .cwh-toggle wrapper (uses inline-flex for its track + text), and the
 * shared .cwh-radio-row / .cwh-checkbox-row components (cwh-form-controls.css
 * sets `display: flex` so the radio and label sit vertically centred —
 * letting this rule override them collapses them back to baseline-aligned
 * block elements and the label visibly drifts off-centre). Also exclude the
 * service-step flex labels — .cwh-service-row__head (checkbox + name + chevron)
 * and .cwh-sub-service-option (radio + name) own their own flex layout; with
 * three :not() classes this rule outweighs the (1,1,1) `#msform label.<class>`
 * overrides below, so without the exclusion they collapse to display:block and
 * the label/chevron drop under the control instead of sitting inline with it. */
#msform label:not(.cwh-toggle):not(.cwh-radio-row):not(.cwh-checkbox-row):not(.cwh-service-row__head):not(.cwh-sub-service-option),
#booking_first_page label:not(.cwh-toggle):not(.cwh-radio-row):not(.cwh-checkbox-row):not(.cwh-service-row__head):not(.cwh-sub-service-option) {
    display: block;
    margin-bottom: 6px;
}

/* Inline note that surfaces directly under the booking-for cards when the
 * Multiple-people option is chosen. Replaces the previous Swal confirmation:
 * carries the group-privacy warning, the per-patient flow disclosure, and
 * the 6-patient cap as a quiet middle-blue panel. */
.cwh-bookingfor__note {
    margin-top: 14px;
    padding: 14px 16px;
    background: rgba(61, 150, 217, 0.08);
    border: 1px solid rgba(61, 150, 217, 0.22);
    border-left: 3px solid var(--cwh-middle-blue);
    border-radius: 10px;
    color: var(--cwh-dark-blue);
    font-family: var(--cwh-font-family);
    font-size: 13px;
    line-height: 1.45;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: cwh-bookingfor-fade .25s ease;
}

.cwh-bookingfor__note > i {
    color: var(--cwh-middle-blue);
    font-size: 18px;
    flex-shrink: 0;
    padding-top: 2px;
}

.cwh-bookingfor__note ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.cwh-bookingfor__note li {
    margin-bottom: 4px;
}

.cwh-bookingfor__note li:last-child {
    margin-bottom: 0;
}

/* Participant fields wrapper — revealed once a card is selected. */
.cwh-participant-fields {
    margin-top: 10px;
    animation: cwh-bookingfor-fade .28s ease;
}

/* "Patient N" heading above each set of name fields. Subtle dark-blue label
 * with a thin underline so each participant block reads as its own group. */
.cwh-patient-header {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 14px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin: 18px 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--cwh-border);
}

/* The first patient header sits close to the top of the participant card —
 * there is no longer a participant-heading above it. */
#participantFieldsWrap form > .cwh-patient-header:first-child {
    margin-top: 8px;
}

/* Cloned patient block — wraps the patient header row + the form fields so
 * the × button can drop the whole block in one click. The wrapper itself
 * has no visual chrome; spacing/divider is provided by .cwh-patient-header
 * inside it. */
.cwh-additional-patient {
    margin: 0;
}

/* Flex header line for added patients — "Patient N" on the left, × button
 * on the right. Replaces the standalone <h5>'s own margin/padding/border
 * so the divider sits at the bottom of the row (under both the title and
 * the button) rather than slicing through the middle. */
.cwh-patient-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--cwh-border);
}

.cwh-patient-header-row .cwh-patient-header {
    margin: 0;
    padding: 0;
    border: none;
    flex: 1 1 auto;
}

/* Compact icon button. Neutral at rest so it doesn't shout for attention
 * before the user decides to act; brand-danger fill on hover/focus to make
 * the destructive intent unambiguous once aimed. */
.cwh-remove-patient-btn {
    flex: 0 0 auto;
    background: var(--cwh-white);
    border: 1px solid var(--cwh-border);
    color: var(--cwh-mid-grey);
    border-radius: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.cwh-remove-patient-btn i {
    color: inherit !important;
    font-size: 12px;
}

.cwh-remove-patient-btn:hover,
.cwh-remove-patient-btn:focus-visible {
    background: var(--cwh-danger);
    border-color: var(--cwh-danger);
    color: var(--cwh-white);
    outline: none;
    box-shadow: 0 0 0 3px var(--cwh-danger-bg);
}

/* When the booker section is visible (Other + Multiple modes), give the
 * patient section a clear visual break so the two groups read as separate
 * blocks rather than one continuous form. The padding-top + top border on
 * the patient section reads as a hairline divider, paired with extra top
 * margin so there's real breathing room above. */
#bookerFieldsWrap:not(.d-none) + #patientSectionWrap {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--cwh-border);
}

/* "Add another patient" row — full-width, button is the only thing inside. */
.cwh-add-patient-wrap {
    margin-top: 4px;
    margin-bottom: 18px;
}

/* Outline-style button so it doesn't compete with the primary Next CTA. */
.cwh-add-patient-btn,
.cwh-add-patient-btn.btn-primary {
    background: var(--cwh-white) !important;
    color: var(--cwh-dark-blue) !important;
    border: 1.5px solid var(--cwh-middle-blue) !important;
    border-radius: 10px !important;
    padding: 10px 18px !important;
    width: 100%;
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    font-size: 13px;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.cwh-add-patient-btn:hover,
.cwh-add-patient-btn.btn-primary:hover {
    background: var(--cwh-middle-blue) !important;
    color: var(--cwh-white) !important;
    border-color: var(--cwh-middle-blue) !important;
}

/* Explicit icon colour — defeats the global icon-pack overrides shipped via
 * icons.min.css that otherwise paint the glyph mid-grey. Tracks the button's
 * text colour through the hover transition. */
.cwh-add-patient-btn i {
    margin-right: 6px;
    color: var(--cwh-dark-blue) !important;
    transition: color .15s ease;
}

.cwh-add-patient-btn:hover i,
.cwh-add-patient-btn.btn-primary:hover i {
    color: var(--cwh-white) !important;
}

@keyframes cwh-bookingfor-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 575px) {
    .cwh-bookingfor {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .cwh-bookingfor__card { padding: 16px 14px; flex-direction: row; justify-content: flex-start; gap: 16px; text-align: left; }
    .cwh-bookingfor__icon { width: 48px; height: 48px; font-size: 22px; border-radius: 12px; flex-shrink: 0; }
    .cwh-bookingfor__card.is-selected::after { top: 50%; transform: translateY(-50%); }
}

/* ---- Responsive tweaks ---------------------------------------------------- */

@media (max-width: 768px) {
    .cwh-booking-banner__title  { font-size: 19px; }
    .cwh-booking-banner__subtitle { font-size: 12px; }
    .cwh-booking-card { padding: 22px 16px; margin: 16px 12px; border-radius: 12px; }
    .cwh-booking-card__header__title    { font-size: 21px; }
    .cwh-booking-card__header__subtitle { font-size: 13px; }
    .cwh-booking-card__header__phone    { font-size: 15px; }
    .cwh-step-indicator-wrap { padding: 28px 16px 0 16px; }
    #progressbar li > a > span { font-size: 11px; }
    #progressbar li > a::before { width: 28px; height: 28px; font-size: 12px; }
    #progressbar li::before { top: 14px; }
}

/* ───────────────────────────────────────────────────────────────────────────
 * Service-selection step (#step8). Mirrors the .cwh-bookingfor card pattern
 * for the category grid + the two-option mode toggle, then layers a
 * collapsable service list with sub-service radios on top. All colours from
 * brand tokens; no per-group overrides.
 * ─────────────────────────────────────────────────────────────────────── */

.cwh-service-step__heading {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 18px;
    margin: 6px 0 4px;
}

.cwh-service-step__lead {
    font-family: var(--cwh-font-family);
    color: var(--cwh-mid-grey);
    font-size: 13px;
    margin: 0 0 18px;
}

/* Mode toggle (Same for everyone / Choose individually) — same square-icon
 * card pattern as .cwh-bookingfor__card but laid out as 2 columns. */
.cwh-service-mode {
    margin-bottom: 22px;
}

.cwh-service-mode__question {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 14px;
    letter-spacing: 0.1px;
    margin-bottom: 12px;
    display: block;
}

.cwh-service-mode__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cwh-service-mode__btn {
    position: relative;
    background: var(--cwh-white);
    border: 1.5px solid var(--cwh-border);
    border-radius: 14px;
    padding: 16px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--cwh-font-family);
    color: var(--cwh-dark-blue);
    font-weight: var(--cwh-font-bold);
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
    text-align: left;
    user-select: none;
}

.cwh-service-mode__btn:hover {
    border-color: var(--cwh-middle-blue);
    box-shadow: 0 4px 14px rgba(0, 51, 126, 0.08);
    transform: translateY(-1px);
}

.cwh-service-mode__btn.is-selected {
    border-color: var(--cwh-dark-blue);
    background: linear-gradient(180deg, rgba(153, 209, 250, 0.18) 0%, rgba(255, 255, 255, 1) 70%);
    box-shadow: 0 6px 18px rgba(0, 51, 126, 0.12);
}

.cwh-service-mode__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--cwh-light-blue);
    color: var(--cwh-dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.cwh-service-mode__btn.is-selected .cwh-service-mode__icon {
    background: var(--cwh-dark-blue);
    color: var(--cwh-light-blue);
}

.cwh-service-mode__btn.is-selected .cwh-service-mode__icon i {
    color: var(--cwh-light-blue) !important;
}

.cwh-service-mode__icon i {
    color: var(--cwh-dark-blue) !important;
}

/* Patient-tab strip — visible only in 'individual' mode with 2+ patients. */
.cwh-service-patient-tabs-wrap {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--cwh-border);
}

.cwh-service-patient-tabs {
    display: flex;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-x: auto;
}

.cwh-service-patient-tab {
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 10px 10px 0 0;
    background: transparent;
    border-bottom: 3px solid transparent;
    font-family: var(--cwh-font-family);
    color: var(--cwh-mid-grey);
    transition: color .15s ease, border-color .15s ease, background .15s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
    min-width: 100px;
}

.cwh-service-patient-tab:hover {
    color: var(--cwh-dark-blue);
    background: rgba(61, 150, 217, 0.06);
}

.cwh-service-patient-tab.active {
    color: var(--cwh-dark-blue);
    border-bottom-color: var(--cwh-middle-blue);
    background: rgba(61, 150, 217, 0.10);
}

.cwh-service-patient-tab__num {
    font-size: 11px;
    font-weight: var(--cwh-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cwh-service-patient-tab__name {
    font-size: 13px;
    font-weight: var(--cwh-font-medium);
}

/* Empty / loading message that appears in place of the list. */
.cwh-service-empty {
    font-family: var(--cwh-font-family);
    font-size: 13px;
    color: var(--cwh-mid-grey);
    padding: 18px 4px;
    margin: 0;
}

/* Nested category list. Replaces the legacy category-card grid + per-category
 * service-list-view swap with a single stack where every allowable category is
 * its own collapsible row. Expanding a category lazily loads its services
 * (rendered as .cwh-service-row rows inside .cwh-service-list[data-category-key]).
 * Multiple categories may be open at once so a patient can pick across them. */
.cwh-service-category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cwh-category-row {
    border: 1.5px solid var(--cwh-border);
    border-radius: 14px;
    background: var(--cwh-white);
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.cwh-category-row:hover {
    border-color: var(--cwh-middle-blue);
    box-shadow: 0 4px 14px rgba(0, 51, 126, 0.06);
}

.cwh-category-row.is-expanded {
    border-color: var(--cwh-dark-blue);
    box-shadow: 0 6px 18px rgba(0, 51, 126, 0.08);
}

.cwh-category-row__head {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--cwh-font-family);
    color: var(--cwh-dark-blue);
    text-align: left;
}

.cwh-category-row.is-expanded .cwh-category-row__head {
    background: linear-gradient(180deg, rgba(153, 209, 250, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
}

.cwh-category-row__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--cwh-light-blue);
    color: var(--cwh-dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: background .18s ease, color .18s ease;
}

.cwh-category-row.is-expanded .cwh-category-row__icon {
    background: var(--cwh-dark-blue);
    color: var(--cwh-light-blue);
}

.cwh-category-row__icon i {
    color: inherit !important;
    line-height: 1;
}

.cwh-category-row__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cwh-category-row__name {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 15px;
    line-height: 1.2;
}

.cwh-category-row__desc {
    font-family: var(--cwh-font-family);
    color: var(--cwh-mid-grey);
    font-size: 12px;
    line-height: 1.35;
}

.cwh-category-row__chevron {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    color: var(--cwh-dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .2s ease, background .15s ease;
}

.cwh-category-row__head:hover .cwh-category-row__chevron {
    background: rgba(61, 150, 217, 0.10);
}

.cwh-category-row.is-expanded .cwh-category-row__chevron {
    transform: rotate(180deg);
}

/* Inner service list — only visible when the category row is expanded. The
 * nested .cwh-service-row / .cwh-sub-service-options markup is re-used as-is
 * from the legacy flat list; only the wrapping container changes. */
.cwh-category-row > .cwh-service-list {
    display: none;
    padding: 4px 16px 16px;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--cwh-border);
    background: var(--cwh-white);
}

.cwh-category-row.is-expanded > .cwh-service-list {
    display: flex;
}

/* Backwards-compatible alias — the single-service auto-skip path still uses
 * `.cwh-service-list` outside a category-row in a couple of tests; keep the
 * base flex shape defined so it renders the same when not nested. */
.cwh-service-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cwh-service-row {
    border: 1.5px solid var(--cwh-border);
    border-radius: 12px;
    background: var(--cwh-white);
    padding: 14px 16px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.cwh-service-row:not(.is-blocked):hover {
    border-color: var(--cwh-middle-blue);
    box-shadow: 0 4px 14px rgba(0, 51, 126, 0.06);
}

.cwh-service-row.is-expanded {
    border-color: var(--cwh-dark-blue);
    background: linear-gradient(180deg, rgba(153, 209, 250, 0.10) 0%, rgba(255, 255, 255, 1) 60%);
}

/* Flex layout for the service-row head (checkbox + name + chevron on one
 * line). The generic `#msform label:not(...)` block rule above excludes
 * `.cwh-service-row__head`, so this wins; the `#msform`-qualified selector is
 * kept alongside the bare class to keep the override robust if that exclusion
 * is ever dropped. */
#msform label.cwh-service-row__head,
.cwh-service-row__head {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.cwh-service-row__check {
    width: 20px;
    height: 20px;
    accent-color: var(--cwh-dark-blue);
    flex-shrink: 0;
    margin: 0;
}

.cwh-service-row__name {
    flex: 1;
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 14px;
}

.cwh-service-row__chevron {
    background: transparent;
    border: none;
    color: var(--cwh-dark-blue);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .2s ease, background .15s ease;
    border-radius: 50%;
}

.cwh-service-row__chevron:hover {
    background: rgba(61, 150, 217, 0.10);
}

.cwh-service-row.is-expanded .cwh-service-row__chevron {
    transform: rotate(180deg);
}

.cwh-service-row__desc {
    font-family: var(--cwh-font-family);
    color: var(--cwh-mid-grey);
    font-size: 12px;
    margin: 6px 0 0 32px;
    line-height: 1.4;
}

/* Booking-information block (heading + body) rendered under each service
 * row and inside each sub-service option. `short_description` becomes a
 * small uppercase middle-blue heading; `body` is the trusted-admin HTML
 * from {service|sub_service}_booking_information.body rendered as a body
 * paragraph in mid-grey. */
.cwh-booking-info {
    margin: 6px 0 0 32px;
    font-family: var(--cwh-font-family);
    line-height: 1.4;
}

/* Service-level info stays hidden until the row is expanded — keeps the
 * collapsed service list tight and only shows the longer info text once
 * the user has shown interest by ticking or expanding. `>` scopes to the
 * row's own info block so the sub-service-option-level info (which is
 * already gated by the row's expand state through .cwh-sub-service-options)
 * is unaffected. */
.cwh-service-row > .cwh-booking-info { display: none; }
.cwh-service-row.is-expanded > .cwh-booking-info { display: block; }

.cwh-booking-info__heading {
    color: var(--cwh-middle-blue);
    font-weight: var(--cwh-font-bold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.cwh-booking-info__body {
    color: var(--cwh-mid-grey);
    font-size: 12.5px;
    line-height: 1.5;
}

.cwh-booking-info__body p           { margin: 0 0 6px 0; }
.cwh-booking-info__body p:last-child { margin-bottom: 0; }
.cwh-booking-info__body ul,
.cwh-booking-info__body ol           { margin: 0 0 6px 18px; padding: 0; }
.cwh-booking-info__body a            { color: var(--cwh-middle-blue); }

/* Sub-service-option wrapper that lets name + booking-info stack
 * vertically next to the radio. The radio gets a small top nudge so it
 * sits level with the name on multi-line rows. */
.cwh-sub-service-option__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.cwh-sub-service-option__text .cwh-booking-info {
    margin-left: 0;
    margin-top: 4px;
}

.cwh-sub-service-option__text .cwh-booking-info__heading { font-size: 10.5px; }
.cwh-sub-service-option__text .cwh-booking-info__body    { font-size: 12px; }

.cwh-sub-service-option input[type="radio"] { margin-top: 2px; }

/* Sub-service radio collapse — shown only when the parent service row has
 * .is-expanded. Radios stack vertically; each option is a clickable row. */
.cwh-sub-service-options {
    display: none;
    margin: 12px 0 4px 32px;
    padding-top: 12px;
    border-top: 1px dashed var(--cwh-border);
    flex-direction: column;
    gap: 8px;
}

.cwh-service-row.is-expanded .cwh-sub-service-options {
    display: flex;
}

/* Same pattern as .cwh-service-row__head — the generic `#msform label`
 * block-style override above excludes `.cwh-sub-service-option`, so this flex
 * layout wins. `flex-start` (not `center`) so the radio aligns with the name's
 * first line when a booking-info body wraps the row to multiple lines. */
#msform label.cwh-sub-service-option,
.cwh-sub-service-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease;
    font-family: var(--cwh-font-family);
    color: var(--cwh-dark-blue);
    font-size: 13px;
    margin: 0;
}

.cwh-sub-service-option:not(.is-blocked):hover {
    background: rgba(61, 150, 217, 0.06);
}

.cwh-sub-service-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--cwh-dark-blue);
}

.cwh-sub-service-option__name {
    font-weight: var(--cwh-font-bold);
}

.cwh-sub-service-option__desc {
    color: var(--cwh-mid-grey);
    font-weight: 400;
    font-size: 12px;
    margin-left: 6px;
}

/* Booking summary block at the foot of the panel — a single table with
 * one row group per participant (label cell uses rowspan to anchor each
 * group), a participant-subtotal row inside each group, and a grand-total
 * row in <tfoot>. Tabular layout keeps the per-participant breakdown
 * scannable across columns, and degrades to a readable browser-default
 * table even with no styles applied. */
.cwh-service-selection-summary {
    margin-top: 24px;
    margin-bottom: 0;
    padding: 18px 0 16px;
    border-top: 1px dashed var(--cwh-border);
    background: var(--cwh-white);
}

.cwh-service-selection-summary:empty {
    display: none;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
}

.cwh-service-summary__label {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.cwh-service-summary__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--cwh-white);
    border: 1px solid var(--cwh-border);
    border-radius: 12px;
    overflow: hidden;
    font-family: var(--cwh-font-family);
    font-size: 13px;
    color: var(--cwh-dark-blue);
}

.cwh-service-summary__table th,
.cwh-service-summary__table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--cwh-border);
    vertical-align: top;
    line-height: 1.35;
}

.cwh-service-summary__table thead th {
    background: rgba(61, 150, 217, 0.08);
    font-weight: var(--cwh-font-bold);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--cwh-dark-blue);
}

.cwh-service-summary__th--time,
.cwh-service-summary__col-time {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}

.cwh-service-summary__th--remove,
.cwh-service-summary__col-remove {
    width: 1%;
    text-align: center;
}

.cwh-service-summary__th--patient,
.cwh-service-summary__col-patient {
    background: rgba(61, 150, 217, 0.04);
    border-right: 1px solid var(--cwh-border);
    font-weight: var(--cwh-font-bold);
    width: 22%;
    min-width: 130px;
}

.cwh-service-summary__col-patient {
    line-height: 1.3;
}

.cwh-service-summary__patient-num,
.cwh-service-summary__patient-name,
.cwh-service-summary__patient-time {
    display: block;
}

.cwh-service-summary__patient-num {
    font-weight: var(--cwh-font-bold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--cwh-dark-blue);
}

.cwh-service-summary__patient-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--cwh-dark-blue);
    margin-top: 2px;
    word-break: break-word;
}

.cwh-service-summary__patient-time {
    font-weight: var(--cwh-font-bold);
    font-size: 12px;
    color: var(--cwh-middle-blue);
    margin-top: 4px;
}

.cwh-service-summary__patient-meta {
    display: inline-block;
    font-weight: 400;
    font-size: 11px;
    color: var(--cwh-mid-grey);
    margin-top: 2px;
}

.cwh-service-summary__col-service {
    font-weight: var(--cwh-font-bold);
}

.cwh-service-summary__col-option {
    color: var(--cwh-mid-grey);
}

.cwh-service-summary__row--empty td {
    color: var(--cwh-mid-grey);
    font-style: italic;
}

.cwh-service-summary__pending {
    color: #8a5500;
    font-style: italic;
}

.cwh-service-summary__row.is-incomplete .cwh-service-summary__col-service {
    color: #8a5500;
}

.cwh-service-summary__row--subtotal td {
    background: rgba(61, 150, 217, 0.06);
    font-weight: var(--cwh-font-bold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cwh-service-summary__subtotal-label {
    text-align: right;
    color: var(--cwh-dark-blue);
}

.cwh-service-summary__subtotal-value {
    text-align: right;
    color: var(--cwh-dark-blue);
    white-space: nowrap;
}

.cwh-service-summary__grand-row td {
    background: rgba(153, 209, 250, 0.5);
    color: var(--cwh-dark-blue);
    border-bottom: none;
    padding: 14px 16px;
}

.cwh-service-summary__grand-label {
    text-align: right;
    font-weight: var(--cwh-font-bold);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cwh-service-summary__grand-value {
    text-align: right;
    font-weight: var(--cwh-font-bold);
    font-size: 16px;
    white-space: nowrap;
}

.cwh-service-summary__empty {
    color: var(--cwh-mid-grey);
    font-style: italic;
}

.cwh-service-summary__remove {
    background: transparent;
    border: none;
    color: var(--cwh-mid-grey);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background .15s ease, color .15s ease;
}

.cwh-service-summary__remove:hover {
    background: rgba(0, 51, 126, 0.10);
    color: var(--cwh-dark-blue);
}

.cwh-service-summary__remove i {
    color: inherit !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 575px) {
    .cwh-service-summary__table { font-size: 12px; }
    .cwh-service-summary__table th,
    .cwh-service-summary__table td { padding: 8px 8px; }
    .cwh-service-summary__col-patient { min-width: 90px; }
}

/* Single-service / single-sub-service auto-skip variants. Used when the
 * booking domain only offers one option at a level — the user has nothing
 * to pick so we render a flat, locked-looking row instead of a checkbox/
 * radio that suggests choice. */
.cwh-service-row--single .cwh-service-row__head--single {
    cursor: default;
    padding: 4px 0 2px;
}

.cwh-service-row--single .cwh-service-row__head--single .cwh-service-row__name {
    font-size: 15px;
}

.cwh-sub-service-option--single.is-locked {
    cursor: default;
    background: rgba(61, 150, 217, 0.06);
    border: 1px dashed rgba(61, 150, 217, 0.30);
}

.cwh-sub-service-option--single.is-locked input[type="radio"] {
    accent-color: var(--cwh-dark-blue);
    opacity: 0.85;
}

/* Service-level eligibility block — applied to the whole row when a
 * service-level eligibility question failed for this patient. The checkbox
 * + chevron are disabled at the HTML level; this just visually reinforces
 * the disabled state via cursor + opacity + a dashed danger border, and
 * keeps the row force-expanded so the not-eligible notice is visible
 * without the user having to click an inactive chevron. */
.cwh-service-row.is-blocked {
    cursor: not-allowed;
    opacity: 0.7;
    background: rgba(220, 53, 69, 0.03);
    border: 1px dashed rgba(220, 53, 69, 0.30);
    border-radius: 10px;
    padding: 6px 10px;
}

.cwh-service-row.is-blocked .cwh-service-row__head,
.cwh-service-row.is-blocked .cwh-service-row__check,
.cwh-service-row.is-blocked .cwh-service-row__chevron {
    cursor: not-allowed;
}

.cwh-service-row.is-blocked .cwh-service-row__chevron i { color: var(--cwh-mid-grey); }

/* Eligibility-blocked sub-service. Greyed out and not clickable so the
 * customer can't reselect a sub-service their answers ruled them out of.
 * Paired with the `Ineligible` pill that surfaces alongside the name and
 * the cwh-service-empty--ineligible note rendered when every option for
 * a service is blocked. */
.cwh-sub-service-option.is-blocked {
    cursor: not-allowed;
    opacity: 0.55;
    background: rgba(220, 53, 69, 0.04);
    border: 1px dashed rgba(220, 53, 69, 0.25);
}

.cwh-sub-service-option.is-blocked input[type="radio"] {
    cursor: not-allowed;
    accent-color: var(--cwh-mid-grey);
}

.cwh-sub-service-option__ineligible {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    background: var(--cwh-danger-bg);
    color: var(--cwh-danger);
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 999px;
    vertical-align: middle;
}

/* "Booked out" pill — surfaced on sub-services with no bookable job under
 * the current location_level scope (no active job or every active job is
 * full). Distinct from the eligibility "Ineligible" pill: capacity is a
 * temporary state we want to communicate as such, so the colour leans on
 * the brand middle-blue rather than the destructive danger tone. The
 * sibling `.is-bookedout` modifier on the wrapper softens the row chrome
 * accordingly (dashed middle-blue border + light-blue tinted background). */
.cwh-sub-service-option__bookedout {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    background: var(--cwh-light-blue);
    color: var(--cwh-dark-blue);
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 999px;
    vertical-align: middle;
}

.cwh-sub-service-option.is-blocked.is-bookedout {
    background: rgba(61, 150, 217, 0.06);
    border: 1px dashed rgba(61, 150, 217, 0.35);
}

.cwh-sub-service-option.is-blocked.is-bookedout input[type="radio"] {
    accent-color: var(--cwh-middle-blue);
}

.cwh-service-empty--ineligible {
    color: var(--cwh-danger);
    background: var(--cwh-danger-bg);
    border: 1px dashed rgba(220, 53, 69, 0.30);
    border-radius: 10px;
    padding: 10px 14px;
    margin: 8px 0 4px 32px;
    font-family: var(--cwh-font-family);
    font-size: 13px;
    font-weight: var(--cwh-font-medium);
}

@media (max-width: 575px) {
    .cwh-service-mode__options { grid-template-columns: 1fr; }
    .cwh-category-row__head { padding: 12px; gap: 10px; }
    .cwh-category-row__icon { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }
    .cwh-category-row__name { font-size: 14px; }
    .cwh-category-row > .cwh-service-list { padding: 4px 12px 14px; }
    .cwh-service-row__desc, .cwh-sub-service-options { margin-left: 0; }
}


/* ───────────────────────────────────────────────────────────────────────────
 * Eligibility step (#step7). Service-driven version of the eligibility
 * questionnaire that sits between the Services step (#step8) and the
 * Time & Location step (#step3). Per-patient tab strip + a stacked form
 * of the deduped questions sourced from each patient's picked services /
 * sub-services. Style mirrors the service-selection step so the wizard
 * reads as a single visual family.
 * ─────────────────────────────────────────────────────────────────────── */

.cwh-eligibility-step__heading {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 18px;
    margin: 6px 0 4px;
}

.cwh-eligibility-step__lead {
    font-family: var(--cwh-font-family);
    color: var(--cwh-mid-grey);
    font-size: 13px;
    margin: 0 0 18px;
}

/* Shared per-participant tab strip. Used by the Eligibility step
 * (`.cwh-eligibility-patient-*`) and the Time & Location step's separate-mode
 * picker (`.cwh-location-patient-*`); both share the same look so a customer
 * sees one consistent "one tab per participant" pattern across the wizard. */
.cwh-patient-tabs,
.cwh-eligibility-patient-tabs,
.cwh-location-patient-tabs {
    display: flex;
    gap: 4px;
    padding: 0;
    margin: 0 0 18px;
    list-style: none;
    overflow-x: auto;
    border-bottom: 1px solid var(--cwh-border);
}

.cwh-patient-tab,
.cwh-eligibility-patient-tab,
.cwh-location-patient-tab {
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 10px 10px 0 0;
    background: transparent;
    border-bottom: 3px solid transparent;
    font-family: var(--cwh-font-family);
    color: var(--cwh-mid-grey);
    transition: color .15s ease, border-color .15s ease, background .15s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
    min-width: 100px;
}

.cwh-patient-tab:hover,
.cwh-eligibility-patient-tab:hover,
.cwh-location-patient-tab:hover {
    color: var(--cwh-dark-blue);
    background: rgba(61, 150, 217, 0.06);
}

.cwh-patient-tab.is-active,
.cwh-eligibility-patient-tab.is-active,
.cwh-location-patient-tab.is-active {
    color: var(--cwh-dark-blue);
    border-bottom-color: var(--cwh-middle-blue);
    background: rgba(61, 150, 217, 0.10);
}

.cwh-patient-tab__num,
.cwh-eligibility-patient-tab__num,
.cwh-location-patient-tab__num {
    font-size: 11px;
    font-weight: var(--cwh-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cwh-patient-tab__name,
.cwh-eligibility-patient-tab__name,
.cwh-location-patient-tab__name {
    font-size: 13px;
    font-weight: var(--cwh-font-medium);
}

/* Plain-show/hide pane mechanism — we drive visibility manually via the
 * `.is-active` class flipped by setActiveEligibilityPatient() /
 * setActiveLocationPatient() rather than leaning on Bootstrap's `.tab-pane` /
 * `.tab-content` (those mis-behaved when nested inside the wizard's own
 * tab-pane and left the inner panes blank). */
.cwh-eligibility-panes,
.cwh-location-panes { padding-top: 4px; }

.cwh-eligibility-patient-pane,
.cwh-location-patient-pane { display: none; }
.cwh-eligibility-patient-pane.is-active,
.cwh-location-patient-pane.is-active { display: block; }

/* Empty-state shown when a participant's tab carries no eligibility
 * questions — keeps the tab clearly "theirs" rather than appearing broken. */
.cwh-eligibility-patient-form__empty {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    color: var(--cwh-middle-blue);
    font-size: 14px;
    margin: 4px 0 28px;
}

.cwh-eligibility-question {
    margin: 0 0 20px;
    padding: 0 0 16px;
    border-bottom: 1px dashed var(--cwh-border);
}

.cwh-eligibility-question:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cwh-eligibility-question__title {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-bold);
    color: var(--cwh-dark-blue);
    font-size: 16px;
    margin: 12px 0 4px;
}

.cwh-eligibility-question__subtitle {
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    color: var(--cwh-middle-blue);
    font-size: 14px;
    margin: 6px 0 4px;
}

.cwh-eligibility-question__label {
    display: block;
    font-family: var(--cwh-font-family);
    font-weight: var(--cwh-font-medium);
    color: var(--cwh-dark-blue);
    font-size: 14px;
    margin-bottom: 6px;
}

.cwh-eligibility-question__required {
    color: var(--cwh-danger, #d33);
    margin-left: 2px;
}

.cwh-eligibility-question__input.form-control {
    font-family: var(--cwh-font-family);
    max-width: 360px;
}

.cwh-eligibility-question__input[type="number"],
.cwh-eligibility-question__input[type="date"] {
    max-width: 220px;
}

/* Radio rows themselves are styled by the shared .cwh-radio-row component in
 * cwh-form-controls.css. This selector only needs the eligibility-specific
 * top padding so the radio group sits below the question label with the same
 * rhythm as the other input types. */
.cwh-eligibility-question__radios { padding: 4px 0 0; }

.cwh-eligibility-question__source {
    display: block;
    margin-top: 6px;
    color: var(--cwh-mid-grey);
    font-size: 11.5px;
    font-style: italic;
}

.cwh-eligibility-question__feedback { display: none; }

.cwh-eligibility-question.is-invalid > .cwh-eligibility-question__feedback,
.cwh-eligibility-question__input.is-invalid + .cwh-eligibility-question__feedback,
.cwh-eligibility-question__radios.is-invalid + .cwh-eligibility-question__feedback {
    display: block;
    color: var(--cwh-danger, #d33);
    font-size: 12px;
    margin-top: 4px;
}

.cwh-eligibility-question__input.is-invalid {
    border-color: var(--cwh-danger, #d33);
}

/* ---- Consent step questions ----------------------------------------------
 * The per-participant consent / in-booking pre-screening forms are injected
 * into #userConsentForm by getPatientConsent.d.php through the shared
 * Booking::getProductQuestions() builder. That builder still emits the legacy
 * float-based .consent-question / .consent-question-buttom split from
 * booking-pharmacy.css (question text floated 70% left, answer column floated
 * ~22% right) — under the narrow unified card that crowded the radios into a
 * stacked column on the right and let adjacent questions' floats collide so
 * some answer controls never rendered cleanly. In the unified theme each
 * consent question should read as a clean stacked block matching the
 * Eligibility step: a middle-blue section heading, normal-weight question
 * text, and answer options laid out inline. Scoped to #userConsentForm so the
 * shared builder's other surfaces are untouched. */

/* Section headings — service name, "Booking Consents"-style heading questions,
 * the pre-screening header and the Parent/Guardian Consent header (all tagged
 * .consent-section-title by the builder). Brand middle-blue accent. */
#userConsentForm .consent-section-title,
#userConsentForm .consent-section-title span {
    color: var(--cwh-middle-blue);
    font-family: var(--cwh-font-family);
}

/* Undo the legacy float / percentage split so the question stacks above its
 * answer, both full width, with normal body text for the question. */
#userConsentForm .consent-question,
#userConsentForm .consent-question-buttom {
    float: none;
    width: 100%;
    display: block;
}

#userConsentForm .consent-question {
    color: var(--cwh-dark-grey);
    font-weight: normal;
    margin-bottom: 8px;
}

/* Lay the answer options out inline below the question. The global
 * `#msform label:not(...)` rule forces every wizard label to display:block,
 * which stacked Yes/No vertically; the two-id #msform #userConsentForm prefix
 * outweighs it so each option label sits inline beside its radio again. Normal
 * body colour/weight so the choices read as plain text rather than headings
 * (the shared `label` rule in cwh-form-controls.css otherwise paints them
 * dark-blue and semibold). */
#msform #userConsentForm .consent-question-buttom label {
    display: inline-block;
    color: var(--cwh-dark-grey);
    font-weight: normal;
    margin-bottom: 0;
    vertical-align: middle;
}

#userConsentForm .consent-question-buttom input[type="radio"] {
    margin-right: 4px;
    vertical-align: middle;
}

/* ────────────────────────────────────────────────────────────────────────
 * Slot resolver refactor — store cards on the Time & Location step.
 * Each card has a two-column "info / map" header, the earliest-slot row
 * and Change Date/Time button, then an inline date selector + AM/PM
 * time-pill grids underneath. The design is driven by the FCWI-67
 * follow-up slot-picker mockup.
 * ──────────────────────────────────────────────────────────────────────── */

.cwh-store-cards {
    font-family: var(--cwh-font-family, "Plus Jakarta Sans", sans-serif);
}

.cwh-store-card {
    background: var(--cwh-white, #ffffff);
    border: 1px solid var(--cwh-border, #e9ecef);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0, 51, 126, 0.05);
}
.cwh-store-card__body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 768px) {
    .cwh-store-card__body { grid-template-columns: 1fr; }
}
.cwh-store-card__info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cwh-store-card__name {
    margin: 0;
    color: var(--cwh-dark-blue, #00337e);
    font-weight: var(--cwh-font-bold, 800);
    font-size: 18px;
}
.cwh-store-card__meta {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--cwh-dark-blue, #00337e);
    font-size: 13px;
}
.cwh-store-card__pin {
    color: #d63838;
    font-size: 24px;
    flex-shrink: 0;
}
.cwh-store-card__meta-text > div { margin-bottom: 2px; }

.cwh-store-card__earliest {
    color: var(--cwh-dark-blue, #00337e);
    font-weight: var(--cwh-font-bold, 800);
    font-size: 15px;
    margin-top: 4px;
}
.cwh-store-card__earliest--empty {
    color: var(--cwh-mid-grey, #65686f);
    font-weight: var(--cwh-font-medium, 600);
    font-size: 14px;
    background: rgba(0, 51, 126, 0.04);
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px dashed var(--cwh-border, #e9ecef);
}
/* Confirmed-pick line. Shares .cwh-store-card__earliest styling so both lines
   read identically; this rule only adds the hide-until-filled behaviour so the
   empty placeholder neither shows nor adds a stray flex gap on first render. */
.cwh-store-card__selected:empty { display: none; }
.cwh-store-card__change {
    align-self: flex-start;
    background: var(--cwh-dark-blue, #00337e);
    color: var(--cwh-white, #ffffff);
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    font-family: var(--cwh-font-family, "Plus Jakarta Sans", sans-serif);
    font-weight: var(--cwh-font-bold, 800);
    font-size: 14px;
    cursor: pointer;
}
.cwh-store-card__change:hover { background: var(--cwh-open-blue, #1773BA); }

.cwh-store-card__map {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f3f5;
}
.cwh-store-card__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.cwh-store-card__picker {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--cwh-border, #e9ecef);
}
.cwh-store-card__picker-label {
    display: block;
    color: var(--cwh-dark-blue, #00337e);
    font-weight: var(--cwh-font-medium, 600);
    font-size: 13px;
    margin-bottom: 6px;
}
.cwh-store-card__date {
    width: 100%;
    max-width: 360px;
    padding: 10px 14px;
    border: 1px solid var(--cwh-border, #e9ecef);
    border-radius: 999px;
    font-family: var(--cwh-font-family, "Plus Jakarta Sans", sans-serif);
    color: var(--cwh-dark-blue, #00337e);
    background: var(--cwh-white, #ffffff);
    margin-bottom: 18px;
}
.cwh-store-card__period {
    color: var(--cwh-dark-blue, #00337e);
    font-weight: var(--cwh-font-bold, 800);
    font-size: 15px;
    margin: 14px 0 10px 0;
}
.cwh-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
}
.cwh-time-pill {
    background: var(--cwh-open-blue, #1773BA);
    color: var(--cwh-white, #ffffff);
    border: none;
    border-radius: 999px;
    padding: 9px 0;
    font-family: var(--cwh-font-family, "Plus Jakarta Sans", sans-serif);
    font-weight: var(--cwh-font-medium, 600);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
    text-align: center;
}
.cwh-time-pill:hover {
    background: var(--cwh-dark-blue, #00337e);
}
.cwh-time-pill:active {
    transform: translateY(1px);
}
.cwh-time-pill.is-selected {
    background: var(--cwh-yellow, #FFED00);
    color: var(--cwh-dark-blue, #00337e);
}

/* ---- Confirmation-page CTAs ---- */
@media (max-width: 768px) {
    a.full-width {
        width: 100%;
    }
}
