/*
 * lead-review.css — 30A.12A-R1 Vancouver Energy Review Lead Capture
 * Mobile-first (iPhone Safari + Samsung Galaxy Chrome), no external deps.
 * Ships alongside the 30A.11 stack without touching experience.css.
 */
:root {
    --accu-lr-fg: #0f2027;
    --accu-lr-fg-soft: #395670;
    --accu-lr-muted: #6f849a;
    --accu-lr-line: #cfd8e3;
    --accu-lr-bg: #f4f8fb;
    --accu-lr-panel: #ffffff;
    --accu-lr-accent: #0a6c74;
    --accu-lr-accent-strong: #084f56;
    --accu-lr-danger: #b0341c;
    --accu-lr-success: #175e3a;
    --accu-lr-focus: #ffb703;
    --accu-lr-radius: 14px;
    --accu-lr-radius-lg: 22px;
    --accu-lr-shadow: 0 10px 30px rgba(15,32,39,.10);
}

.accueco-lead-review {
    background: linear-gradient(180deg, #eef4f8 0%, #f9fbfd 100%);
    color: var(--accu-lr-fg);
    padding: 44px 20px 56px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: max(56px, env(safe-area-inset-bottom));
    /* 30A.12B-R1: anchor lands with the entire heading visible below the fixed nav.
       --effective-header-height is exported by the 30A.11 header runtime; the
       fallback keeps behaviour sane on standalone /thank-you/ where 30A.11 is not loaded. */
    scroll-margin-top: calc(var(--effective-header-height, 64px) + env(safe-area-inset-top) + 16px);
    /* 30A.12B-R1: ensure the lead component sits above SAGE / cursor / colony / card-tilt
       overlays without modifying their internals. High enough to escape typical decorative
       z-index layers, low enough not to fight legitimate modal chrome (>= 1000). */
    position: relative;
    z-index: 40;
    /* 30A.12B-R1: kill any inherited global text-shadow. Weight/colour/spacing carry the
       hierarchy on the light form surface. */
    text-shadow: none !important;
}
.accueco-lead-review * { box-sizing: border-box; }
/* 30A.12B-R1: scoped text-shadow reset for every descendant — headings, copy, labels,
   helpers, fields, options, validation, consent, submit controls, success and thank-you. */
.accueco-lead-review,
.accueco-lead-review *,
.accueco-lead-review *::before,
.accueco-lead-review *::after {
    text-shadow: none !important;
}
/* 30A.12B-R1: back-to-top collision control.
   When the review section is on screen OR contains keyboard focus, hide the shared
   back-to-top control so it never covers form content on 375-430px viewports.
   Implemented via feature-local CSS classes toggled by lead-review.js observer;
   also supports a body-level [data-lr-section-visible="1"] fallback for JS-off. */
body[data-lr-section-visible="1"] .accueco-back-to-top,
body[data-lr-section-visible="1"] #accuecoBackToTop,
body[data-lr-section-visible="1"] .back-to-top,
body[data-lr-section-visible="1"] [data-back-to-top],
body:has(#accuecoLeadReview:focus-within) .accueco-back-to-top,
body:has(#accuecoLeadReview:focus-within) #accuecoBackToTop,
body:has(#accuecoLeadReview:focus-within) .back-to-top,
body:has(#accuecoLeadReview:focus-within) [data-back-to-top] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.accueco-lead-review__wrap {
    max-width: 640px;
    margin: 0 auto;
}
.accueco-lead-review__eyebrow {
    font: 700 12px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accu-lr-accent);
    margin: 0 0 8px;
}
.accueco-lead-review__title {
    font: 700 26px/1.18 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    margin: 0 0 10px;
    color: var(--accu-lr-fg);
}
.accueco-lead-review__intro {
    font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-fg-soft);
    margin: 0 0 22px;
}
.accueco-lead-review__panel {
    background: var(--accu-lr-panel);
    border: 1px solid var(--accu-lr-line);
    border-radius: var(--accu-lr-radius-lg);
    box-shadow: var(--accu-lr-shadow);
    padding: 20px 18px 22px;
}
.accueco-lead-review__field {
    display: block;
    margin: 0 0 14px;
}
.accueco-lead-review__label {
    display: block;
    font: 600 14px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-fg);
    margin: 0 0 6px;
}
.accueco-lead-review__label--optional::after {
    content: " (optional)";
    color: var(--accu-lr-muted);
    font-weight: 400;
}
.accueco-lead-review__hint {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: var(--accu-lr-muted);
    margin: 4px 0 0;
}
.accueco-lead-review__input,
.accueco-lead-review__select,
.accueco-lead-review__textarea {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    font: 400 16px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-fg);
    background: #fff;
    border: 1.5px solid var(--accu-lr-line);
    border-radius: var(--accu-lr-radius);
    -webkit-appearance: none;
    appearance: none;
}
.accueco-lead-review__textarea {
    min-height: 110px;
    padding: 12px 14px;
    resize: vertical;
}
.accueco-lead-review__select {
    background-image:
      linear-gradient(45deg, transparent 50%, var(--accu-lr-fg-soft) 50%),
      linear-gradient(135deg, var(--accu-lr-fg-soft) 50%, transparent 50%);
    background-position:
      calc(100% - 20px) 22px,
      calc(100% - 14px) 22px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
}
.accueco-lead-review__input:focus,
.accueco-lead-review__select:focus,
.accueco-lead-review__textarea:focus {
    outline: 3px solid var(--accu-lr-focus);
    outline-offset: 2px;
    border-color: var(--accu-lr-accent-strong);
}
.accueco-lead-review__field--invalid .accueco-lead-review__input,
.accueco-lead-review__field--invalid .accueco-lead-review__select,
.accueco-lead-review__field--invalid .accueco-lead-review__textarea {
    border-color: var(--accu-lr-danger);
    background-color: #fff3ef;
}
.accueco-lead-review__field-error {
    display: none;
    margin: 6px 0 0;
    color: var(--accu-lr-danger);
    font: 600 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.accueco-lead-review__field--invalid .accueco-lead-review__field-error {
    display: block;
}
.accueco-lead-review__consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 6px 0 18px;
}
.accueco-lead-review__consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin: 2px 0 0;
    accent-color: var(--accu-lr-accent);
}
.accueco-lead-review__consent-text {
    font: 400 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-fg-soft);
}
.accueco-lead-review__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--accu-lr-radius);
    background: var(--accu-lr-accent);
    color: #fff;
    font: 700 16px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.accueco-lead-review__submit:hover { background: var(--accu-lr-accent-strong); }
.accueco-lead-review__submit:focus-visible {
    outline: 3px solid var(--accu-lr-focus);
    outline-offset: 2px;
}
.accueco-lead-review__submit[aria-disabled="true"],
.accueco-lead-review__submit:disabled {
    opacity: .68;
    cursor: default;
}
.accueco-lead-review__submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: accu-lr-spin .8s linear infinite;
}
.accueco-lead-review__form[data-lr-state="submitting"] .accueco-lead-review__submit-spinner {
    display: inline-block;
}
@keyframes accu-lr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .accueco-lead-review__submit-spinner { animation-duration: 3s; }
}

/* Honeypot: hidden from users + assistive tech, visible to naive bots */
.accueco-lead-review__pot {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.accueco-lead-review__form-error {
    display: none;
    margin: 0 0 14px;
    padding: 12px 14px;
    background: #fff3ef;
    border: 1px solid var(--accu-lr-danger);
    border-radius: var(--accu-lr-radius);
    color: var(--accu-lr-danger);
    font: 600 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.accueco-lead-review__form[data-lr-state="error"] .accueco-lead-review__form-error {
    display: block;
}

.accueco-lead-review__success {
    display: none;
    padding: 22px 20px;
    background: #eaf6ee;
    border: 1px solid #b5dcc2;
    border-radius: var(--accu-lr-radius-lg);
    color: var(--accu-lr-success);
}
.accueco-lead-review__success h3 {
    margin: 0 0 10px;
    font: 700 20px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.accueco-lead-review__success p {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.5;
}
.accueco-lead-review__success .accueco-lead-review__ref {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #b5dcc2;
    border-radius: 8px;
    font: 700 14px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: .06em;
}
.accueco-lead-review[data-lr-view="success"] .accueco-lead-review__panel { display: none; }
.accueco-lead-review[data-lr-view="success"] .accueco-lead-review__success { display: block; }

/* Hero + Proof Story CTAs pointing to this section */
.accueco-lead-review-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 22px;
    margin-top: 12px;
    border-radius: var(--accu-lr-radius);
    background: transparent;
    color: var(--accu-lr-accent-strong);
    border: 2px solid var(--accu-lr-accent);
    font: 700 15px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.accueco-lead-review-cta:hover,
.accueco-lead-review-cta:focus-visible {
    background: var(--accu-lr-accent);
    color: #fff;
    outline: 3px solid var(--accu-lr-focus);
    outline-offset: 2px;
}

/* Portrait mobile refinements (iPhone Safari + Galaxy Chrome) */
@media (max-width: 430px) {
    .accueco-lead-review { padding-top: 32px; padding-bottom: max(44px, env(safe-area-inset-bottom)); }
    .accueco-lead-review__title { font-size: 22px; }
    .accueco-lead-review__panel { padding: 18px 16px 20px; }
}
@media (min-width: 720px) {
    .accueco-lead-review__title { font-size: 32px; }
    .accueco-lead-review__panel { padding: 28px 26px 30px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .accueco-lead-review, .accueco-lead-review * { animation: none !important; transition: none !important; }
}

/* Forced-colors mode (Windows high-contrast) */
@media (forced-colors: active) {
    .accueco-lead-review__submit,
    .accueco-lead-review-cta,
    .accueco-lead-review__return-link,
    .accueco-lead-review__copy-btn {
        border: 2px solid CanvasText;
        background: ButtonFace;
        color: ButtonText;
    }
    .accueco-lead-review__ref-code,
    .accueco-lead-review__ref {
        border: 1px solid CanvasText;
        color: CanvasText;
    }
}

/* -----------------------------------------------------------------------
   30A.12B-R1 — Thank-you journey
   ----------------------------------------------------------------------- */
.accueco-lead-review-body {
    margin: 0;
    background: linear-gradient(180deg, #eef4f8 0%, #f9fbfd 100%);
    color: var(--accu-lr-fg);
    font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top);
}
.accueco-lead-review--thankyou {
    padding-top: calc(56px + env(safe-area-inset-top));
    padding-bottom: max(72px, env(safe-area-inset-bottom));
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
}
.accueco-lead-review__thankyou {
    background: var(--accu-lr-panel);
    border: 1px solid var(--accu-lr-line);
    border-radius: var(--accu-lr-radius-lg);
    box-shadow: var(--accu-lr-shadow);
    padding: 22px 18px 26px;
    outline: none;
}
.accueco-lead-review__ref-intro {
    margin: 20px 0 6px;
    font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-fg-soft);
}
.accueco-lead-review__ref.accueco-lead-review__ref--display {
    display: block;
    margin: 6px 0 20px;
    padding: 14px 16px;
    background: #f4f8fb;
    border: 1px solid var(--accu-lr-line);
    border-radius: var(--accu-lr-radius);
    text-align: center;
}
.accueco-lead-review__ref-code {
    display: inline-block;
    font: 700 22px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: .1em;
    color: var(--accu-lr-fg);
    user-select: all;
    -webkit-user-select: all;
}
.accueco-lead-review__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 12px;
}
.accueco-lead-review__copy-btn {
    /* Overrides for the primary action on thank-you: same shape as submit. */
    width: 100%;
    text-align: center;
}
.accueco-lead-review__copy-btn[data-copied="true"] {
    background: var(--accu-lr-success);
}
/* -----------------------------------------------------------------------
   30A.12E-R1 — Booking handoff ("Choose your next step")
   The booking section sits below the primary Copy Reference action and above
   the Return-to-Accueco footer link. Mobile-first: 375 -> 390 -> 412 -> desktop.
   ----------------------------------------------------------------------- */
.accueco-lead-review__booking {
    margin: 18px 0 6px;
    padding: 16px 14px 14px;
    background: #eef5f8;
    border: 1px solid #cddfe6;
    border-radius: var(--accu-lr-radius);
}
.accueco-lead-review__booking-heading {
    margin: 0 0 6px;
    font: 700 17px/1.25 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-fg);
}
.accueco-lead-review__booking-lede {
    margin: 0 0 12px;
    font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-fg-soft);
}
.accueco-lead-review__booking-note {
    margin: 10px 0 0;
    font: 400 13px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-muted);
}
.accueco-lead-review__book-btn {
    width: 100%;
    background: transparent;
    color: var(--accu-lr-accent-strong);
    border: 2px solid var(--accu-lr-accent);
    /* 30A.12E-R1 mobile-first target: >= 52 px high, 16 px label text. */
    min-height: 52px;
    padding: 14px 20px;
    border-radius: var(--accu-lr-radius);
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 700 16px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.accueco-lead-review__book-btn:hover,
.accueco-lead-review__book-btn:focus-visible {
    background: var(--accu-lr-accent);
    color: #fff;
    outline: 3px solid var(--accu-lr-focus);
    outline-offset: 2px;
}
.accueco-lead-review__actions--footer {
    margin-top: 14px;
}
.accueco-lead-review__return-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    color: var(--accu-lr-accent-strong);
    text-decoration: none;
    font: 600 15px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    border-radius: var(--accu-lr-radius);
}
.accueco-lead-review__return-link:hover,
.accueco-lead-review__return-link:focus-visible {
    text-decoration: underline;
    outline: 3px solid var(--accu-lr-focus);
    outline-offset: 2px;
}
.accueco-lead-review__copy-status {
    margin: 4px 0 0;
    min-height: 20px;
    font: 500 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-success);
}
.accueco-lead-review__inbox-note {
    margin: 22px 0 0;
    padding: 12px 14px;
    background: #f4f8fb;
    border-radius: var(--accu-lr-radius);
    font: 500 13px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--accu-lr-fg-soft);
}
@media (min-width: 720px) {
    .accueco-lead-review__thankyou { padding: 28px 26px 32px; }
    .accueco-lead-review__ref-code { font-size: 26px; }
    .accueco-lead-review__actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .accueco-lead-review__copy-btn,
    .accueco-lead-review__book-btn,
    .accueco-lead-review__return-link {
        width: auto;
        flex: 1 1 auto;
    }
    .accueco-lead-review__return-link { flex: 0 0 auto; }
}
