/* Consultation booking page: compact header, booking visible on first screen, easy on mobile.
   Loaded last on /consultation/ only. Legacy .ref-* rules use !important, so these are scoped + !important. */

/* ---------- Compact header + steps ---------- */
.azcs-head { background: radial-gradient(circle at 75% 35%, #1c3c2f 0%, #2d5244 45%, #2b4f41 100%); border-bottom: 2px solid rgba(196, 148, 60, .3); padding: 18px 0; }
.azcs-head-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px 32px; flex-wrap: wrap; }
body .ref-consult-main .azcs-head .azcs-title { font-family: 'Cinzel', Georgia, serif; font-size: clamp(1.5rem, 3vw, 2rem) !important; line-height: 1.15 !important; margin: 0 !important; color: #fff !important; font-weight: 700; letter-spacing: .02em !important; }
body .ref-consult-main { padding-top: 0 !important; }
body .ref-consult-main .azcs-head .azcs-title span { color: #e0b955 !important; }
.azcs-sub { display: block; margin-top: 4px; font-size: .92rem; color: #cbe2d7 !important; }
.azcs-steps { display: flex; align-items: center; gap: 8px; }
.azcs-step { display: flex; align-items: center; gap: 8px; }
.azcs-dot { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; color: #cbe2d7; background: rgba(25, 54, 42, .75); border: 1.5px solid rgba(196, 148, 60, .45); transition: all .25s ease; }
.azcs-lbl { font-size: .8rem; font-weight: 600; color: #cbe2d7; white-space: nowrap; }
.azcs-step.active .azcs-dot { background: linear-gradient(135deg, #be9e4d, #d4a843); color: #1f3a2f; border-color: #be9e4d; box-shadow: 0 0 12px rgba(190, 158, 77, .45); }
.azcs-step.active .azcs-lbl { color: #f0cf7a; }
.azcs-line { width: 26px; height: 0; border-top: 1px dashed rgba(190, 158, 77, .5); }
.azcs-line.active { border-top: 1px solid #be9e4d; }

/* Login hint: slim strip, not a big box */
.azcs-login { background: #fff8e6; border-bottom: 1px solid #e8d3a0; }
.azcs-login-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.azcs-login-inner span { color: #5a4515 !important; font-size: .86rem; font-weight: 500; }
.azcs-login-inner a { background: #2d5244; color: #fff !important; font-weight: 700; font-size: .84rem; padding: 6px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap; }

/* ---------- Booking area (all sizes) ---------- */
body .ref-consult-main .ref-booking-section { padding: 28px 0 56px !important; }
body .ref-consult-main .ref-booking-container { gap: 28px !important; }
body .ref-consult-main .ref-step-meta-head { margin-bottom: 16px !important; padding-bottom: 12px !important; }
body .ref-consult-main .ref-step-main-title { font-size: 1.6rem !important; margin-bottom: 4px !important; }
body .ref-consult-main .ref-service-selection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 12px !important; }
body .ref-consult-main .ref-consult-card { padding: 16px 14px !important; min-height: 0 !important; }
body .ref-consult-main .ref-consult-card.selected { border: 2px solid #be9e4d !important; background: rgba(190, 158, 77, .16) !important; }
body .ref-consult-main .ref-consult-trust-pills { margin-top: 18px !important; }
.azcs-alert { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: #fdecea; border: 1px solid #f0b4b0; color: #b3261e !important; font-weight: 600; font-size: .9rem; }

/* Bottom action bar: mobile only */
.azcs-bar { display: none; }

@media (max-width: 1100px) {
    body .ref-consult-main .ref-service-selection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .azcs-head { padding: 12px 0 14px; }
    .azcs-head-inner { gap: 10px; }
    body .ref-consult-main .azcs-head .azcs-title { font-size: 1.3rem !important; }
    .azcs-sub { display: none; }
    .azcs-steps { width: 100%; justify-content: space-between; gap: 4px; }
    .azcs-line { flex: 1 1 auto; width: auto; min-width: 8px; }
    .azcs-dot { width: 28px; height: 28px; font-size: .75rem; }
    .azcs-lbl { display: none; }
    .azcs-steps[data-current="1"] #stepIndicator1 .azcs-lbl,
    .azcs-steps[data-current="2"] #stepIndicator2 .azcs-lbl,
    .azcs-steps[data-current="3"] #stepIndicator3 .azcs-lbl,
    .azcs-steps[data-current="4"] #stepIndicator4 .azcs-lbl { display: inline; font-size: .76rem; }
    .azcs-login-inner { flex-wrap: nowrap; padding-top: 6px; padding-bottom: 6px; }
    .azcs-login-inner span { font-size: .76rem; flex: 1 1 auto; line-height: 1.3; }
    .azcs-login-inner a { font-size: .78rem; padding: 6px 12px; flex: 0 0 auto; }

    body .ref-consult-main .ref-booking-section { padding: 14px 0 120px !important; }
    body .ref-consult-main .ref-booking-container { display: block !important; padding-left: 14px !important; padding-right: 14px !important; }

    /* Titles: short, no long descriptions */
    body .ref-consult-main .ref-step-tag { font-size: .66rem !important; margin-bottom: 2px !important; }
    body .ref-consult-main .ref-step-main-title { font-size: 1.25rem !important; }
    body .ref-consult-main .ref-step-main-desc { display: none !important; }
    body .ref-consult-main .ref-step-meta-head { margin-bottom: 12px !important; padding-bottom: 8px !important; }

    /* Services: one compact row each -> all options visible without long scrolling */
    body .ref-consult-main .ref-service-selection-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; }
    body .ref-consult-main .ref-consult-card {
        display: grid !important;
        grid-template-columns: 42px minmax(0, 1fr) auto !important;
        grid-template-areas: "icon title fee" "icon dur fee" !important;
        column-gap: 12px !important; row-gap: 2px !important; align-items: center !important;
        padding: 10px 12px !important; text-align: left !important; border-radius: 12px !important;
    }
    body .ref-consult-main .ref-card-icon-frame { grid-area: icon; width: 42px !important; height: 42px !important; margin: 0 !important; font-size: 1rem !important; }
    body .ref-consult-main .ref-card-title { grid-area: title; margin: 0 !important; font-size: .96rem !important; line-height: 1.25 !important; }
    body .ref-consult-main .ref-card-desc, body .ref-consult-main .ref-card-check { display: none !important; }
    body .ref-consult-main .ref-card-footer { display: contents !important; }
    body .ref-consult-main .ref-card-fee { grid-area: fee; justify-self: end; font-size: 1.05rem !important; font-weight: 800 !important; }
    body .ref-consult-main .ref-card-dur { grid-area: dur; justify-self: start; font-size: .75rem !important; background: none !important; border: 0 !important; padding: 0 !important; text-align: left !important; box-shadow: none !important; }

    /* Things that only add length */
    body .ref-consult-main .ref-consult-trust-pills,
    body .ref-consult-main .ref-sub-lock-note,
    body .ref-consult-main .ref-booking-sidebar .ref-summary-box { display: none !important; }
    body .ref-consult-main .ref-booking-sidebar { position: static !important; margin-top: 18px !important; }

    /* The bottom bar replaces the in-form buttons */
    body .ref-consult-main .ref-step-cta-row,
    body .ref-consult-main .ref-step-nav-buttons { display: none !important; }

    /* Date + time */
    body .ref-consult-main .ref-dt-picker-box { display: block !important; padding: 14px !important; }
    body .ref-consult-main .ref-dt-col + .ref-dt-col { margin-top: 14px !important; }
    body .ref-consult-main .ref-slots-wrap { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
    body .ref-consult-main .ref-slot-pill { text-align: center !important; padding: 11px 6px !important; font-size: .85rem !important; }

    /* Details form: 16px text stops iOS zooming in */
    body .ref-consult-main .ref-client-inputs-grid { display: block !important; }
    body .ref-consult-main .ref-client-inputs-grid > * { margin-bottom: 12px !important; }
    body .ref-consult-main .ref-input-text,
    body .ref-consult-main .ref-input-date,
    body .ref-consult-main .ref-input-textarea { font-size: 16px !important; min-height: 48px; width: 100% !important; box-sizing: border-box !important; }

    /* Bottom bar */
    .azcs-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #d6e4dc; box-shadow: 0 -6px 20px rgba(0, 0, 0, .18); }
    .azcs-bar-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
    .azcs-bar-name { font-size: .74rem; color: #4d806a !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .azcs-bar-total { font-size: 1.2rem; color: #1f3a2f !important; font-weight: 800; }
    .azcs-bar-go { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #be9e4d, #d9ae48); color: #1f3a2f !important; font-weight: 800; font-size: 15px; cursor: pointer; }
    .azcs-bar-go:disabled { opacity: .7; }
    .azcs-bar-back[hidden] { display: none !important; }
    .azcs-bar-back { flex: 0 0 auto; display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 12px; border: 1.5px solid #c2dbd0; background: #fff; color: #2d5244; font-size: 1rem; cursor: pointer; }
    body.consult-bar-on .mobile-bottom-nav,
    body.consult-bar-on .ref-back-to-top { display: none !important; }
}

/* ---------- Desktop: compact cards, sticky Continue, shorter summary ---------- */
@media (min-width: 861px) {
    body .ref-consult-main .ref-consult-card { padding: 12px 14px !important; }
    body .ref-consult-main .ref-card-icon-frame { width: 38px !important; height: 38px !important; margin-bottom: 8px !important; font-size: .95rem !important; }
    body .ref-consult-main .ref-card-title { font-size: .95rem !important; margin-bottom: 4px !important; }
    body .ref-consult-main .ref-card-desc { display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .78rem !important; line-height: 1.35 !important; margin-bottom: 8px !important; }
    body .ref-consult-main .ref-consult-trust-pills { display: none !important; }

    /* Continue / Back buttons stay visible at the bottom of the screen while choosing */
    body .ref-consult-main .ref-step-cta-row,
    body .ref-consult-main .ref-step-nav-buttons {
        position: sticky !important; bottom: 0 !important; z-index: 20 !important;
        background: linear-gradient(180deg, rgba(237, 243, 240, 0), #edf3f0 30%) !important;
        padding: 22px 0 14px !important; margin-top: 6px !important;
    }

    /* Summary stays short enough to fit next to the form */
    body .ref-consult-main .ref-summary-box { padding: 18px !important; }
    body .ref-consult-main .ref-sum-trust-list { display: none !important; }
}

/* The theme sets overflow:auto on html/body/#page/main, which turns them into (non-scrolling) scroll containers and
   silently disables position:sticky. `clip` hides sideways overflow the same way without that side effect. */
html:has(.ref-consult-main),
body:has(.ref-consult-main),
body #page:has(.ref-consult-main),
body .ref-consult-main {
    overflow: visible !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
}

/* ---------- Readability fixes (legacy dark-theme colours left white text on white/light boxes) ---------- */
/* Step 2: date + time slots */
body .ref-consult-main .ref-input-date,
body .ref-consult-main .ref-input-text,
body .ref-consult-main .ref-input-textarea {
    color: #1f3a2f !important; -webkit-text-fill-color: #1f3a2f !important;
    background: #fff !important; border: 1.5px solid #c2dbd0 !important; border-radius: 10px !important;
    color-scheme: light;
}
body .ref-consult-main .ref-input-date { min-height: 48px; padding: 0 12px !important; width: 100%; box-sizing: border-box; }
body .ref-consult-main .ref-slots-wrap { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
body .ref-consult-main .ref-slot-pill {
    color: #2d5244 !important; -webkit-text-fill-color: #2d5244 !important;
    background: #fff !important; border: 1.5px solid #c2dbd0 !important;
    font-weight: 600 !important; text-align: center !important; padding: 12px 8px !important; border-radius: 10px !important;
    cursor: pointer; opacity: 1 !important;
}
body .ref-consult-main .ref-slot-pill:hover { border-color: #be9e4d !important; background: #fff8e6 !important; }
body .ref-consult-main .ref-slot-pill.selected {
    background: #be9e4d !important; border-color: #be9e4d !important;
    color: #1f3a2f !important; -webkit-text-fill-color: #1f3a2f !important; font-weight: 800 !important;
}

/* Step 4: the confirmation values were white on a white card */
body .ref-consult-main .ref-final-review-card .ref-review-row strong,
body .ref-consult-main .ref-final-review-card strong { color: #1f3a2f !important; -webkit-text-fill-color: #1f3a2f !important; }

/* Back / Change buttons: darker gold so the text can be read */
body .ref-consult-main .ref-btn-gold-outline {
    color: #7a5a12 !important; -webkit-text-fill-color: #7a5a12 !important;
    border: 1.5px solid #be9e4d !important; background: #fffaf0 !important; font-weight: 700 !important;
}

/* Booking summary header: icon and title on one line */
body .ref-consult-main .ref-summary-header { display: flex !important; align-items: center !important; gap: 10px !important; }
body .ref-consult-main .ref-summary-header h3 { margin: 0 !important; padding: 0 !important; border: 0 !important; flex: 1 1 auto; line-height: 1.2 !important; }
