/* aeo-audit: aeo-wizard — progress dots + connecting lines for setup-wizard.php
 * Lifted from canonical-url's inline wizard <style> block; brought into a real
 * component file so the orchestrator stays free of inline <style> per UI Rules.
 */

.aeo-wizard__shell {
    /* Path 3 / Round 4.A — widened from 48rem (3xl) to 72rem (6xl).
     * 6xl gives Step 2's grouped accordions a comfortable two-column layout
     * on tablets and lets Step 3's progress strip breathe without feeling
     * like the rest of the dashboard. The hero strip + progress dots scale
     * naturally with the wider container.
     *
     * Round 8 — dropped `min-height: 85vh`. Pre-scan the only content is
     * hero + progress dots + a short title/paragraph/button block, and the
     * 85vh reservation was leaving a large empty band below the card before
     * the user clicked Scan Site. The shell now sizes to content; the loader
     * and results paths still expand naturally.
     */
    max-width: 86rem;
    margin: 1.25rem auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Round 6 — 3-column header band: site identity / title / support CTA.
 * Soft lavender gradient (token-only, no new hex) mirroring the dashboard
 * upsell card's purple-centered palette. */
.aeo-wizard__hero {
    border-radius: 1rem;
    border: 1px solid var(--border-base);
    background: linear-gradient(135deg,
        rgb(var(--bg-primary-rgb) / 0.12) 0%,
        rgb(var(--bg-primary-rgb) / 0.28) 100%);
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.dark .aeo-wizard__hero {
    border-color: var(--border-base);
    background: linear-gradient(135deg,
        rgb(var(--bg-primary-rgb) / 0.10) 0%,
        rgb(var(--bg-primary-rgb) / 0.22) 100%);
}

.aeo-wizard__hero-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.aeo-wizard__hero-site,
.aeo-wizard__hero-action {
    flex: 0 0 auto;
}
.aeo-wizard__hero-title {
    flex: 1 1 auto;
    text-align: center;
    min-width: 0;
}

.aeo-wizard__hero-site {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.aeo-wizard__hero-site-icon {
    font-size: 1.5rem;
    color: var(--bg-primary);
    flex: 0 0 auto;
}
.aeo-wizard__hero-site-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 0;
}
.aeo-wizard__hero-site-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(75 85 99);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dark .aeo-wizard__hero-site-label { color: rgb(209 213 219); }
.aeo-wizard__hero-site-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    max-width: 12rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #ffffff;
    color: rgb(31 41 55);
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.08);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}
.dark .aeo-wizard__hero-site-pill {
    background-color: rgb(55 65 81);
    color: rgb(243 244 246);
}

/* Round 8 — pill upgrades to an external-link anchor when $siteUrl is present.
 * Hover/focus tints background + bumps color toward brand purple so the
 * affordance is clear without an underline. */
.aeo-wizard__hero-site-pill--link {
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.aeo-wizard__hero-site-pill--link:hover,
.aeo-wizard__hero-site-pill--link:focus-visible {
    background-color: rgb(243 244 246);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px -2px rgb(0 0 0 / 0.12);
    outline: none;
}
.dark .aeo-wizard__hero-site-pill--link:hover,
.dark .aeo-wizard__hero-site-pill--link:focus-visible {
    background-color: rgb(75 85 99);
    color: #c4b5fd;
}
.aeo-wizard__hero-site-pill-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.aeo-wizard__hero-site-pill-icon {
    font-size: 0.875rem;
    opacity: 0.65;
    flex: 0 0 auto;
}
.aeo-wizard__hero-site-pill--link:hover .aeo-wizard__hero-site-pill-icon,
.aeo-wizard__hero-site-pill--link:focus-visible .aeo-wizard__hero-site-pill-icon {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .aeo-wizard__hero-site-pill--link { transition: none; }
    .aeo-wizard__hero-site-pill--link:hover,
    .aeo-wizard__hero-site-pill--link:focus-visible { transform: none; }
}

.aeo-wizard__hero-heading {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    color: rgb(31 41 55);
    margin: 0;
}
.dark .aeo-wizard__hero-heading { color: #ffffff; }
.aeo-wizard__hero-subtitle {
    font-size: 0.875rem;
    color: rgb(75 85 99);
    margin: 0.25rem 0 0 0;
}
.dark .aeo-wizard__hero-subtitle { color: rgb(209 213 219); }

@media (max-width: 767px) {
    .aeo-wizard__hero-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.875rem;
    }
    .aeo-wizard__hero-site {
        justify-content: center;
    }
    .aeo-wizard__hero-site  .aeo-wizard__hero-site-text {
        align-items: center;
    }
    .aeo-wizard__hero-title {
        text-align: center;
    }
    .aeo-wizard__hero-action { width: 100%; }
    .aeo-wizard__hero-action #aeo-wizard-support-btn { width: 100%; }
}

/* Round 7 — Step 1 "Scan Site" trigger. Dedicated container guarantees full
 * row width + true centering inside the card-body padding, and serves as the
 * hide-on-complete hook (toggled by the JS when results render successfully).
 * Round 8 extended the hide rule to also cover the in-progress state — the
 * orbital loader + "Talking to Wix…" text are the indicator; the trigger
 * pill button alongside is redundant. */
.aeo-wizard-scan-trigger {
    width: 100%;
    display: flex;
    margin: 1.5rem 0;
}
.aeo-wizard--scan-in-progress .aeo-wizard-scan-trigger,
.aeo-wizard--scan-complete    .aeo-wizard-scan-trigger {
    display: none;
}

.aeo-wizard__progress {
    width: 100%;
    margin: 2.5rem auto 1rem;
  
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.aeo-wizard__track,
.aeo-wizard__fill {
    position: absolute;
    top: 25%;
    height: 4px;
    margin-top: -1px;
    pointer-events: none;
}
.aeo-wizard__track {
    left: 12%;
    right: 12%;
    margin-inline: auto;
    background-color: rgb(229 231 235);
}
.dark .aeo-wizard__track {
    background-color: rgb(107 114 128);
}
.aeo-wizard__fill {
    left: 12%;
    width: calc(var(--progress) * 0.76);
    background-color: var(--bg-primary);
    transition: width 500ms ease;
}

.aeo-wizard__step       { flex: 1 1 0; text-align: center; position: relative; padding: 0 0.5rem; }
.aeo-wizard__step-dot   {
    width: 2.5rem; height: 2.5rem;
    margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9999px;
    border: 4px solid;
    transition: all 300ms ease;
    position: relative;
    z-index: 10;
    font-size: 0.875rem;
    font-weight: 700;
}
.aeo-wizard__step-label {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 300ms ease;
    color: rgb(75 85 99);
    min-height: 20px;
    line-height: normal;
    display: block;
}

.aeo-wizard__step--pending   .aeo-wizard__step-dot {
    background-color: rgb(229 231 235);
    border-color: rgb(229 231 235);
    color: rgb(107 114 128);
}
.dark .aeo-wizard__step--pending .aeo-wizard__step-dot {
    background-color: rgb(107 114 128);
    border-color: rgb(75 85 99);
}

.aeo-wizard__step--current .aeo-wizard__step-dot {
    background-color: #ffffff;
    border-color: var(--bg-primary);
    color: var(--txt-primary);
    box-shadow: 0 0 0 4px #ffffff,
                0 0 0 5px var(--bg-primary);
}
.dark .aeo-wizard__step--current .aeo-wizard__step-dot {
    background-color: rgb(75 85 99);
    box-shadow: 0 0 0 4px rgb(39 49 66),
                0 0 0 5px var(--bg-primary);
}
.aeo-wizard__step--current .aeo-wizard__step-label,
.aeo-wizard__step--done    .aeo-wizard__step-label {
    color: var(--txt-primary);
    font-weight: 600;
}

.aeo-wizard__step--done .aeo-wizard__step-dot {
    background-color: var(--bg-primary);
    border-color: var(--bg-primary);
    color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    .aeo-wizard__fill,
    .aeo-wizard__step-dot,
    .aeo-wizard__step-label { transition: none; }
}

/* ----------------------------------------------------------------------------
 * Step 1 — page-type count cards. Replaces the old wall-of-URLs list.
 * Renders one card per non-empty page-type (D-064).
 * -------------------------------------------------------------------------- */

.aeo-type-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-base);
    border-radius: 0.75rem;
    background-color: rgb(var(--bg-primary-rgb) / 0.05);
    transition: border-color 200ms ease, transform 200ms ease;
}
.aeo-type-card:hover {
    border-color: var(--bg-primary);
    transform: translateY(-1px);
}
.dark .aeo-type-card {
    background-color: rgb(var(--bg-primary-rgb) / 0.08);
}
.aeo-type-card__icon {
    font-size: 1.5rem;
    color: var(--bg-primary);
    flex: 0 0 auto;
}
.aeo-type-card__body { min-width: 0; flex: 1 1 auto; }
.aeo-type-card__count {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: rgb(31 41 55);
}
.dark .aeo-type-card__count { color: rgb(243 244 246); }
.aeo-type-card__label {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: rgb(107 114 128);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ----------------------------------------------------------------------------
 * Step 2 — collapsible accordion per page-type. Native <details>/<summary>
 * with custom chrome.
 * -------------------------------------------------------------------------- */

.aeo-step2__groups {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.aeo-step2__group {
    border: 1px solid var(--border-base);
    border-radius: 0.75rem;
    background-color: #ffffff;
    overflow: hidden;
}
.dark .aeo-step2__group {
    background-color: rgb(31 41 55);
}
.aeo-step2__group-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.aeo-step2__group-summary::-webkit-details-marker { display: none; }
.aeo-step2__group-icon {
    font-size: 1.25rem;
    color: var(--bg-primary);
    flex: 0 0 auto;
}
.aeo-step2__group-label {
    font-weight: 600;
    color: rgb(31 41 55);
    flex: 1 1 auto;
}
.dark .aeo-step2__group-label { color: rgb(243 244 246); }
.aeo-step2__group-count {
    font-size: 0.75rem;
    color: rgb(107 114 128);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background-color: rgb(243 244 246);
}
.dark .aeo-step2__group-count {
    background-color: rgb(55 65 81);
    color: rgb(209 213 219);
}
.aeo-step2__group-chevron {
    font-size: 1.25rem;
    color: rgb(156 163 175);
    transition: transform 200ms ease;
}
.aeo-step2__group[open] .aeo-step2__group-chevron {
    transform: rotate(180deg);
}
.aeo-step2__group-body {
    border-top: 1px solid var(--border-base);
    max-height: 18rem;
    overflow-y: auto;
}
.aeo-step2__row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--border-base);
    cursor: pointer;
}
.aeo-step2__row:last-child { border-bottom: 0; }
.aeo-step2__row:hover {
    background-color: rgb(249 250 251);
}
.dark .aeo-step2__row:hover {
    background-color: rgb(17 24 39);
}
.aeo-step2__row input[type="checkbox"] { margin-top: 0.25rem; }
.aeo-step2__row-text { min-width: 0; flex: 1 1 auto; }
.aeo-step2__row-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(31 41 55);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dark .aeo-step2__row-title { color: rgb(229 231 235); }
.aeo-step2__row-url {
    font-size: 0.75rem;
    color: rgb(156 163 175);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----------------------------------------------------------------------------
 * Step 3 — per-type completion strip under the progress bar.
 * -------------------------------------------------------------------------- */

.aeo-step3__by-type {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}
.aeo-step3__by-type-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgb(75 85 99);
}
.dark .aeo-step3__by-type-row { color: rgb(209 213 219); }
.aeo-step3__by-type-icon {
    font-size: 0.875rem;
    color: var(--bg-primary);
    flex: 0 0 auto;
}
.aeo-step3__by-type-label {
    flex: 1 1 auto;
}
.aeo-step3__by-type-counts {
    font-variant-numeric: tabular-nums;
    color: rgb(107 114 128);
}

/* ─── Round 26 / D-106 — Step 2.5 (optional competitor URLs) ─────────────
 * Reuses .aeo-settings__field* styles from settings.css (loaded globally
 * via partials/head.php). The small additions below scope the spacing to
 * the wizard context without overriding Settings page chrome.
 */
.aeo-step25__section {
    margin-top: 0.5rem;
}
.aeo-step25__section .aeo-settings__field {
    margin-bottom: 0.875rem;
}
#aeo-step25-flash:empty { display: none; }
#aeo-step25-flash.is-visible {
    margin-bottom: 1rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}
#aeo-step25-flash.aeo-settings__flash--error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
:is(.dark #aeo-step25-flash.aeo-settings__flash--error) {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}
