/* AEIOM Quotes — public form styles. Premium / professional look.
   Brand vars (--aeiom-q-primary, --aeiom-q-accent, --aeiom-q-ink, --aeiom-q-bg)
   are injected inline by Aeiom_Quotes_Form::enqueue_assets() from niche config. */

/* ───────────────────────────────────────────────────────────────────
 * Page container
 * ─────────────────────────────────────────────────────────────────── */

.aeiom-quote-page {
    background: #f3f5f8;
    padding: 0 0 80px;
}

.aq-page {
    color: var(--aeiom-q-ink, #1f2a44);
    font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ───────────────────────────────────────────────────────────────────
 * Hero band — gradient strip at top
 * ─────────────────────────────────────────────────────────────────── */

.aq-hero {
    position: relative;
    padding: 80px 20px 140px;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.aq-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(600px 360px at 12% 28%, rgba(255,255,255,.14), transparent 65%),
        radial-gradient(700px 420px at 88% 78%, rgba(255,255,255,.10), transparent 60%),
        linear-gradient(135deg, var(--aeiom-q-primary, #0b3d63) 0%, color-mix(in srgb, var(--aeiom-q-primary, #0b3d63) 30%, var(--aeiom-q-accent, #00a99d) 70%) 130%);
}

@supports not (background: color-mix(in srgb, red, blue)) {
    .aq-hero-bg {
        background:
            radial-gradient(600px 360px at 12% 28%, rgba(255,255,255,.14), transparent 65%),
            radial-gradient(700px 420px at 88% 78%, rgba(255,255,255,.10), transparent 60%),
            linear-gradient(135deg, var(--aeiom-q-primary, #0b3d63) 0%, var(--aeiom-q-accent, #00a99d) 130%);
    }
}

.aq-hero-inner {
    max-width: 1140px;
    margin: 0 auto;
    text-align: center;
}

.aq-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.24);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 22px;
    backdrop-filter: blur(6px);
}

.aq-hero-eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,.18);
    animation: aq-pulse 1.8s ease-in-out infinite;
}

@keyframes aq-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
    50%      { box-shadow: 0 0 0 6px rgba(255,255,255,.08); }
}

.aq-hero-title {
    margin: 0 0 14px;
    font-size: clamp(28px, 4.5vw, 46px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
}

.aq-hero-sub {
    margin: 0 auto;
    max-width: 620px;
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.55;
    opacity: .92;
}

/* ───────────────────────────────────────────────────────────────────
 * Shell + grid layout
 * ─────────────────────────────────────────────────────────────────── */

.aq-shell {
    max-width: 1140px;
    margin: -100px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.aq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

/* ───────────────────────────────────────────────────────────────────
 * Form card (preserves .aeiom-quote-form-wrap for JS hook)
 * ─────────────────────────────────────────────────────────────────── */

.aeiom-quote-form-wrap.aq-card,
.aeiom-quote-form-wrap {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .04),
        0 24px 60px -20px rgba(15, 23, 42, .18),
        0 8px 24px -10px rgba(15, 23, 42, .10);
    border: 1px solid rgba(15, 23, 42, .04);
}

/* Honeypot — fully off-screen. */
.aeiom-quote-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ───────────────────────────────────────────────────────────────────
 * Step bar — counter + title + progress
 * ─────────────────────────────────────────────────────────────────── */

.aq-stepbar {
    margin: 0 0 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eef0f4;
}

.aq-stepbar-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.aq-stepbar-counter {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-variant-numeric: tabular-nums;
    color: var(--aeiom-q-primary, #0b3d63);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.aq-stepbar-counter-current { font-size: 18px; font-weight: 800; }
.aq-stepbar-counter-sep     { opacity: .4; margin: 0 4px; }
.aq-stepbar-counter-total   { opacity: .5; }

.aq-stepbar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--aeiom-q-ink, #1f2a44);
    letter-spacing: -.01em;
}

.aeiom-quote-progress {
    margin: 0;
}

.aeiom-quote-progress-track {
    position: relative;
    height: 4px;
    background: #eef0f4;
    border-radius: 999px;
    overflow: hidden;
}

.aeiom-quote-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--aeiom-q-primary, #0b3d63), var(--aeiom-q-accent, #00a99d));
    border-radius: 999px;
    transition: width .35s cubic-bezier(.2, .8, .25, 1);
}

.aeiom-quote-progress-steps {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 6px;
    font-size: 11px;
    color: #6b7280;
}

.aeiom-quote-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    transition: color .2s;
    cursor: default;
}

.aeiom-quote-progress-step-num,
.aeiom-quote-progress-step-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    transition: background .2s, color .2s, transform .2s;
}

.aeiom-quote-progress-step-num {
    background: #eef0f4;
    color: #6b7280;
    font-weight: 700;
    font-size: 12px;
    border: 2px solid transparent;
}

.aeiom-quote-progress-step-check {
    display: none;
    width: 26px;
    height: 26px;
    color: #fff;
    background: var(--aeiom-q-primary, #0b3d63);
    padding: 5px;
}

.aeiom-quote-progress-step.is-active .aeiom-quote-progress-step-num {
    background: #fff;
    color: var(--aeiom-q-primary, #0b3d63);
    border-color: var(--aeiom-q-primary, #0b3d63);
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(11, 61, 99, .14);
}

.aeiom-quote-progress-step.is-done .aeiom-quote-progress-step-num { display: none; }
.aeiom-quote-progress-step.is-done .aeiom-quote-progress-step-check { display: inline-flex; }

.aeiom-quote-progress-step.is-active { color: var(--aeiom-q-primary, #0b3d63); font-weight: 600; }
.aeiom-quote-progress-step.is-done   { color: var(--aeiom-q-primary, #0b3d63); }

.aeiom-quote-progress-step-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: none;
}

/* ───────────────────────────────────────────────────────────────────
 * Sections + transitions
 * ─────────────────────────────────────────────────────────────────── */

.aeiom-quote-section {
    border: 0;
    padding: 0;
    margin: 0;
    display: none;
    animation: aq-fade-in .35s cubic-bezier(.2, .8, .25, 1);
}

.aeiom-quote-section.is-active { display: block; }

@keyframes aq-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.aeiom-quote-form--nojs .aeiom-quote-section {
    display: block;
    margin-bottom: 40px;
    animation: none;
}
.aeiom-quote-form--nojs .aq-stepbar { display: none; }

.aeiom-quote-section-title {
    display: none; /* the stepbar title supersedes the legend on JS-driven UI */
    font-size: 22px;
    font-weight: 700;
    color: var(--aeiom-q-primary, #0b3d63);
    margin-bottom: 18px;
    padding: 0;
}

.aeiom-quote-form--nojs .aeiom-quote-section-title { display: block; }

/* ───────────────────────────────────────────────────────────────────
 * Fields
 * ─────────────────────────────────────────────────────────────────── */

.aeiom-quote-fields {
    display: grid;
    gap: 18px;
}

.aeiom-quote-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aeiom-quote-label {
    font-size: 14px;
    font-weight: 600;
    color: #344054;
    letter-spacing: -.005em;
}

.aeiom-quote-required {
    color: #e11d48;
    font-weight: 700;
}

.aeiom-quote-input,
.aeiom-quote-textarea,
.aeiom-quote-select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-appearance: none;
    appearance: none;
}

.aeiom-quote-input::placeholder,
.aeiom-quote-textarea::placeholder { color: #98a2b3; }

.aeiom-quote-input:hover,
.aeiom-quote-textarea:hover,
.aeiom-quote-select:hover { border-color: #cbd5e1; }

.aeiom-quote-input:focus,
.aeiom-quote-textarea:focus,
.aeiom-quote-select:focus {
    outline: 0;
    border-color: var(--aeiom-q-primary, #0b3d63);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--aeiom-q-primary, #0b3d63) 14%, transparent);
    background: #fafbfd;
}

@supports not (background: color-mix(in srgb, red, blue)) {
    .aeiom-quote-input:focus,
    .aeiom-quote-textarea:focus,
    .aeiom-quote-select:focus {
        box-shadow: 0 0 0 4px rgba(11, 61, 99, .14);
    }
}

.aeiom-quote-textarea { resize: vertical; min-height: 104px; line-height: 1.5; }

/* Custom select arrow */
.aeiom-quote-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

/* Custom checkboxes (multiselect) — render as pill cards */
.aeiom-quote-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aeiom-quote-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
    user-select: none;
    font-size: 14px;
    font-weight: 500;
}

.aeiom-quote-check:hover { border-color: #cbd5e1; }
.aeiom-quote-check input { accent-color: var(--aeiom-q-primary, #0b3d63); margin: 0; }

.aeiom-quote-check:has(input:checked) {
    background: color-mix(in srgb, var(--aeiom-q-primary, #0b3d63) 8%, #fff);
    border-color: var(--aeiom-q-primary, #0b3d63);
    color: var(--aeiom-q-primary, #0b3d63);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--aeiom-q-primary, #0b3d63) 10%, transparent);
}

/* Yes / No radios — bigger toggle-pill style */
.aeiom-quote-radios {
    display: inline-flex;
    background: #f3f5f8;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 4px;
    gap: 0;
}

.aeiom-quote-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border-radius: 9px;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
    font-size: 14px;
    font-weight: 600;
    color: #667085;
    min-width: 72px;
    text-align: center;
}

.aeiom-quote-radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.aeiom-quote-radio:has(input:checked) {
    background: #fff;
    color: var(--aeiom-q-primary, #0b3d63);
    box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 12px -4px rgba(15,23,42,.16);
}

/* Field error state */
.aeiom-quote-field-error {
    display: none;
    margin: 4px 0 0;
    font-size: 13px;
    color: #e11d48;
    font-weight: 500;
}
.aeiom-quote-field.is-error .aeiom-quote-field-error { display: block; }
.aeiom-quote-field.is-error .aeiom-quote-input,
.aeiom-quote-field.is-error .aeiom-quote-textarea,
.aeiom-quote-field.is-error .aeiom-quote-select {
    border-color: #e11d48;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, .12);
}

/* ───────────────────────────────────────────────────────────────────
 * Nav buttons
 * ─────────────────────────────────────────────────────────────────── */

.aeiom-quote-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eef0f4;
}

.aeiom-quote-nav-spacer { display: inline-block; width: 1px; }

.aeiom-quote-form--nojs .aeiom-quote-nav [data-step-next],
.aeiom-quote-form--nojs .aeiom-quote-nav [data-step-prev] { display: none; }
.aeiom-quote-form--nojs .aeiom-quote-nav { border-top: 0; padding-top: 0; justify-content: flex-end; }

.aeiom-quote-btn {
    appearance: none;
    border: 0;
    padding: 13px 22px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    letter-spacing: -.005em;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .15s, background .15s, color .15s, opacity .15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.aeiom-quote-btn:active { transform: translateY(1px); }
.aeiom-quote-btn[disabled] { opacity: .55; cursor: not-allowed; }

.aeiom-quote-btn--primary {
    background: linear-gradient(135deg, var(--aeiom-q-primary, #0b3d63), var(--aeiom-q-accent, #00a99d));
    color: #fff;
    box-shadow: 0 6px 18px -2px rgba(11, 61, 99, .35), 0 2px 6px rgba(0,0,0,.08);
}

.aeiom-quote-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px -3px rgba(11, 61, 99, .42), 0 3px 8px rgba(0,0,0,.10);
}

.aeiom-quote-btn--ghost {
    background: transparent;
    color: #475467;
    border: 1.5px solid #e5e7eb;
    padding: 11.5px 18px;
}

.aeiom-quote-btn--ghost:hover {
    border-color: var(--aeiom-q-primary, #0b3d63);
    color: var(--aeiom-q-primary, #0b3d63);
    background: #fafbfd;
}

.aeiom-quote-submit {
    padding: 15px 30px;
    font-size: 16px;
}

.aeiom-quote-submit-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 999px;
    animation: aq-spin .65s linear infinite;
}

.aeiom-quote-submit[disabled] .aeiom-quote-submit-spinner { display: inline-block; }
.aeiom-quote-submit[disabled] .aeiom-quote-submit-arrow { display: none; }
@keyframes aq-spin { to { transform: rotate(360deg); } }

/* ───────────────────────────────────────────────────────────────────
 * Feedback + success state
 * ─────────────────────────────────────────────────────────────────── */

.aeiom-quote-feedback {
    margin-top: 16px;
    padding: 0;
    font-size: 14px;
}

.aeiom-quote-feedback.is-error {
    padding: 12px 14px;
    background: #fff1f3;
    border: 1px solid #fecdd3;
    border-left: 3px solid #e11d48;
    border-radius: 8px;
    color: #9f1239;
}

.aeiom-quote-success {
    text-align: center;
    padding: 48px 24px;
}

.aeiom-quote-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    color: #16a34a;
    animation: aq-pop .5s cubic-bezier(.2, .8, .25, 1.2);
}

.aeiom-quote-success-icon svg { width: 100%; height: 100%; }

@keyframes aq-pop {
    from { opacity: 0; transform: scale(.6); }
    to   { opacity: 1; transform: scale(1); }
}

.aeiom-quote-success-title {
    margin: 0 0 10px;
    color: var(--aeiom-q-primary, #0b3d63);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.015em;
}

.aeiom-quote-success-body {
    margin: 0;
    color: #667085;
    font-size: 16px;
}

/* ───────────────────────────────────────────────────────────────────
 * Side panel — trust + next steps
 * ─────────────────────────────────────────────────────────────────── */

.aq-side {
    display: grid;
    gap: 16px;
}

.aq-trust,
.aq-next {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, .04);
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.10);
}

.aq-side-title {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--aeiom-q-primary, #0b3d63);
}

.aq-trust-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.aq-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #344054;
    font-weight: 500;
}

.aq-trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--aeiom-q-accent, #00a99d) 12%, #fff);
    color: var(--aeiom-q-accent, #00a99d);
    flex-shrink: 0;
}

@supports not (background: color-mix(in srgb, red, blue)) {
    .aq-trust-icon { background: rgba(0, 169, 157, .12); }
}

.aq-trust-icon svg { width: 18px; height: 18px; }

.aq-next-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    counter-reset: aq-next;
}

.aq-next-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #344054;
    line-height: 1.45;
}

.aq-next-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--aeiom-q-primary, #0b3d63) 10%, #fff);
    color: var(--aeiom-q-primary, #0b3d63);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

@supports not (background: color-mix(in srgb, red, blue)) {
    .aq-next-num { background: rgba(11, 61, 99, .10); }
}

/* ───────────────────────────────────────────────────────────────────
 * Responsive
 * ─────────────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
    .aeiom-quote-form-wrap.aq-card,
    .aeiom-quote-form-wrap { padding: 36px 36px; }

    .aeiom-quote-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .aeiom-quote-field--textarea,
    .aeiom-quote-field--multiselect { grid-column: 1 / -1; }

    .aeiom-quote-progress-step-label { display: block; }
}

@media (min-width: 960px) {
    .aq-hero { padding: 100px 24px 160px; }

    .aq-shell { margin-top: -120px; }

    .aq-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 28px;
    }

    .aeiom-quote-form-wrap.aq-card,
    .aeiom-quote-form-wrap { padding: 44px 44px; }

    .aq-side {
        position: sticky;
        top: 28px;
    }

    .aeiom-quote-fields { gap: 22px; }
}

@media (max-width: 480px) {
    /* Extra top padding so the now-visible theme header (sticky on inner pages)
       doesn't cover the eyebrow + title. */
    .aq-hero { padding: 96px 16px 110px; }
    .aq-shell { margin-top: -90px; padding: 0 12px; }
    .aeiom-quote-form-wrap.aq-card,
    .aeiom-quote-form-wrap { padding: 22px 18px; border-radius: 16px; }

    .aeiom-quote-btn,
    .aeiom-quote-submit { padding: 13px 20px; font-size: 15px; }
    .aeiom-quote-nav { gap: 8px; }

    .aq-stepbar-title { font-size: 17px; }
}
