/* Autos Esquivel — /vende-tu-auto: correcciones finales de light mode.
 * Se carga al final de la página para neutralizar estilos oscuros residuales
 * de componentes React y mantener contraste consistente sin tocar dark mode.
 */

html[data-theme="light"] .ae-sell-page {
    color-scheme: light;
    --ae-sell-bg: #f5f5f2;
    --ae-sell-panel: #ffffff;
    --ae-sell-panel-soft: #f0f1ed;
    --ae-sell-panel-raised: #fafaf8;
    --ae-sell-ink: #101216;
    --ae-sell-text: #30353b;
    --ae-sell-muted: #6d747c;
    --ae-sell-line: #d9dbd6;
    --ae-sell-line-strong: #bfc3bd;
    --ae-sell-accent: #111318;
    --ae-sell-accent-contrast: #ffffff;
    background: var(--ae-sell-bg) !important;
    color: var(--ae-sell-ink) !important;
}

/* El hero continúa deliberadamente oscuro; sólo limpiamos fugas de tema claro. */
html[data-theme="light"] .ae-sell-page .ae-sell-page__hero {
    background: #07090c !important;
    color: #fff !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__hero h1,
html[data-theme="light"] .ae-sell-page .ae-sell-page__hero strong,
html[data-theme="light"] .ae-sell-page .ae-sell-page__hero-feature strong,
html[data-theme="light"] .ae-sell-page .ae-sell-page__route strong {
    color: #fff !important;
}

/* Rail */
html[data-theme="light"] .ae-sell-page .ae-sell-page__rail {
    border-color: var(--ae-sell-line) !important;
    background: #f8f8f5 !important;
    color: var(--ae-sell-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__rail .site-shell > div {
    border-color: var(--ae-sell-line) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__rail strong {
    color: var(--ae-sell-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__rail span,
html[data-theme="light"] .ae-sell-page .ae-sell-page__rail small {
    color: var(--ae-sell-muted) !important;
}

/* Configurador */
html[data-theme="light"] .ae-sell-page .ae-sell-page__configurator {
    --ae-config-bg: #f5f5f2;
    --ae-config-panel: #ffffff;
    --ae-config-panel-soft: #f2f3ef;
    --ae-config-panel-raised: #fafaf8;
    --ae-config-ink: #111318;
    --ae-config-text: #30353b;
    --ae-config-muted: #70767e;
    --ae-config-line: #d9dbd6;
    --ae-config-line-strong: #bcc0ba;
    --ae-config-accent: #111318;
    --ae-config-accent-contrast: #ffffff;
    --ae-config-shadow: 0 24px 64px rgba(17,19,24,.09);
    border-color: var(--ae-config-line) !important;
    background: var(--ae-config-bg) !important;
    color: var(--ae-config-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__configurator .ae-sell {
    --sell-bg: transparent;
    --sell-panel: var(--ae-config-panel);
    --sell-panel-soft: var(--ae-config-panel-soft);
    --sell-ink: var(--ae-config-ink);
    --sell-muted: var(--ae-config-muted);
    --sell-line: var(--ae-config-line);
    --sell-line-strong: var(--ae-config-line-strong);
    --sell-accent: var(--ae-config-accent);
    --sell-accent-contrast: var(--ae-config-accent-contrast);
    background: transparent !important;
    color: var(--ae-config-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__form-card,
html[data-theme="light"] .ae-sell-page .ae-sell__summary,
html[data-theme="light"] .ae-sell-page .ae-sell__success,
html[data-theme="light"] .ae-sell-page .ae-sell__progress,
html[data-theme="light"] .ae-sell-page .ae-sell__select-menu,
html[data-theme="light"] .ae-sell-page .ae-sell__choice,
html[data-theme="light"] .ae-sell-page .ae-sell__branch {
    border-color: var(--ae-config-line) !important;
    background: var(--ae-config-panel) !important;
    color: var(--ae-config-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__progress {
    background: var(--ae-config-panel-raised) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__fields input,
html[data-theme="light"] .ae-sell-page .ae-sell__fields select,
html[data-theme="light"] .ae-sell-page .ae-sell__fields textarea,
html[data-theme="light"] .ae-sell-page .ae-sell__select-trigger {
    border-color: var(--ae-config-line) !important;
    background: var(--ae-config-panel-soft) !important;
    color: var(--ae-config-ink) !important;
    caret-color: var(--ae-config-ink) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__fields input::placeholder,
html[data-theme="light"] .ae-sell-page .ae-sell__fields textarea::placeholder,
html[data-theme="light"] .ae-sell-page .ae-sell__select-trigger .is-placeholder {
    color: #8a9097 !important;
    opacity: 1 !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__fields input:hover,
html[data-theme="light"] .ae-sell-page .ae-sell__fields select:hover,
html[data-theme="light"] .ae-sell-page .ae-sell__fields textarea:hover,
html[data-theme="light"] .ae-sell-page .ae-sell__select-trigger:hover {
    border-color: var(--ae-config-line-strong) !important;
    background: #fff !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__fields input:focus,
html[data-theme="light"] .ae-sell-page .ae-sell__fields select:focus,
html[data-theme="light"] .ae-sell-page .ae-sell__fields textarea:focus,
html[data-theme="light"] .ae-sell-page .ae-sell__select-trigger:focus-visible,
html[data-theme="light"] .ae-sell-page .ae-sell__select.is-open .ae-sell__select-trigger {
    border-color: #111318 !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(17,19,24,.08), 0 14px 34px rgba(17,19,24,.07) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__select-menu {
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 24px 60px rgba(17,19,24,.14) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__select-option {
    background: transparent !important;
    color: var(--ae-config-text) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__select-option:hover,
html[data-theme="light"] .ae-sell-page .ae-sell__select-option:focus-visible {
    background: #f1f2ee !important;
    color: var(--ae-config-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__select-option.is-selected,
html[data-theme="light"] .ae-sell-page .ae-sell__choice.is-active,
html[data-theme="light"] .ae-sell-page .ae-sell__branch.is-active {
    border-color: #111318 !important;
    background: #111318 !important;
    color: #fff !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__select-option.is-selected *,
html[data-theme="light"] .ae-sell-page .ae-sell__choice.is-active *,
html[data-theme="light"] .ae-sell-page .ae-sell__branch.is-active * {
    color: inherit !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__choice-copy strong,
html[data-theme="light"] .ae-sell-page .ae-sell__branch strong,
html[data-theme="light"] .ae-sell-page .ae-sell__summary strong,
html[data-theme="light"] .ae-sell-page .ae-sell__summary b,
html[data-theme="light"] .ae-sell-page .ae-sell__step-heading h3 {
    color: var(--ae-config-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell__choice-copy small,
html[data-theme="light"] .ae-sell-page .ae-sell__branch small,
html[data-theme="light"] .ae-sell-page .ae-sell__summary small,
html[data-theme="light"] .ae-sell-page .ae-sell__summary p,
html[data-theme="light"] .ae-sell-page .ae-sell__step-heading p,
html[data-theme="light"] .ae-sell-page .ae-sell__progress-top,
html[data-theme="light"] .ae-sell-page .ae-sell__progress li {
    color: var(--ae-config-muted) !important;
}

/* Evidencia fotográfica: este componente no tenía variante light. */
html[data-theme="light"] .ae-sell-page .ae-valuation-media {
    --vm-bg: #ffffff;
    --vm-panel: #f5f6f2;
    --vm-panel-2: #eceee9;
    --vm-text: #111318;
    --vm-muted: #717880;
    --vm-line: #d8dad5;
    --vm-line-strong: #b9beb7;
    border-color: var(--vm-line) !important;
    color: var(--vm-text) !important;
    background:
        linear-gradient(rgba(17,19,24,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17,19,24,.025) 1px, transparent 1px),
        var(--vm-bg) !important;
    background-size: 56px 56px !important;
    box-shadow: 0 24px 64px rgba(17,19,24,.08) !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__kicker,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__header aside > span,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__copy strong,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__footer strong,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__header h3 {
    color: var(--vm-text) !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__kicker i {
    background: #111318 !important;
    box-shadow: none !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__header p,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__header aside > small,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__copy small,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__footer p,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__privacy {
    color: var(--vm-muted) !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__header aside,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__shot,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__footer {
    border-color: var(--vm-line) !important;
    background: var(--vm-panel) !important;
    color: var(--vm-text) !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__shot:hover,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__shot:focus-within {
    border-color: var(--vm-line-strong) !important;
    background: #fafbf8 !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__visual {
    border-color: var(--vm-line) !important;
    background: #eceee9 !important;
    color: #4d545c !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__actions label {
    border-color: #111318 !important;
    background: #111318 !important;
    color: #fff !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__actions button {
    border-color: var(--vm-line-strong) !important;
    background: #fff !important;
    color: #111318 !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__check {
    background: #111318 !important;
    color: #fff !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__footer button {
    border-color: #111318 !important;
    background: #111318 !important;
    color: #fff !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__footer.is-saved {
    border-color: #111318 !important;
    box-shadow: inset 3px 0 0 #111318 !important;
}

html[data-theme="light"] .ae-sell-page .ae-valuation-media__actions label:has(input:focus-visible),
html[data-theme="light"] .ae-sell-page .ae-valuation-media__actions button:focus-visible,
html[data-theme="light"] .ae-sell-page .ae-valuation-media__footer button:focus-visible {
    outline-color: rgba(17,19,24,.24) !important;
}

/* Prediagnóstico: refuerzo final para evitar herencias oscuras. */
html[data-theme="light"] .ae-sell-page .ae-valuation-readiness {
    --vr-bg: #ffffff;
    --vr-panel: #f4f5f2;
    --vr-panel-2: #eceeea;
    --vr-ink: #111318;
    --vr-muted: #747a82;
    --vr-line: #d8dad6;
    --vr-line-strong: #bcc0bb;
    border-color: var(--vr-line) !important;
    background: var(--vr-bg) !important;
    color: var(--vr-ink) !important;
    box-shadow: 0 18px 48px rgba(17,19,24,.07) !important;
}

/* Secciones inferiores */
html[data-theme="light"] .ae-sell-page .ae-sell-page__information,
html[data-theme="light"] .ae-sell-page .ae-sell-page__faq {
    background: #f5f5f2 !important;
    color: var(--ae-sell-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__information-copy h2,
html[data-theme="light"] .ae-sell-page .ae-sell-page__faq h2,
html[data-theme="light"] .ae-sell-page .ae-sell-page__documents strong,
html[data-theme="light"] .ae-sell-page .ae-sell-page__faq-list summary {
    color: var(--ae-sell-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__information-copy > span,
html[data-theme="light"] .ae-sell-page .ae-sell-page__information-copy > p,
html[data-theme="light"] .ae-sell-page .ae-sell-page__documents p,
html[data-theme="light"] .ae-sell-page .ae-sell-page__faq header > span,
html[data-theme="light"] .ae-sell-page .ae-sell-page__faq header > p,
html[data-theme="light"] .ae-sell-page .ae-sell-page__faq-list details p {
    color: var(--ae-sell-muted) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__documents article,
html[data-theme="light"] .ae-sell-page .ae-sell-page__faq-list details {
    border-color: var(--ae-sell-line) !important;
    background: #fff !important;
    color: var(--ae-sell-ink) !important;
    box-shadow: 0 12px 34px rgba(17,19,24,.05) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__faq-list summary span {
    border-color: var(--ae-sell-line-strong) !important;
    background: #f0f1ed !important;
    color: var(--ae-sell-ink) !important;
}

html[data-theme="light"] .ae-sell-page .ae-sell-page__faq-list details[open] summary span {
    border-color: #111318 !important;
    background: #111318 !important;
    color: #fff !important;
}

@media (prefers-contrast: more) {
    html[data-theme="light"] .ae-sell-page {
        --ae-sell-line: #aeb2ab;
        --ae-sell-line-strong: #858b83;
        --ae-sell-muted: #50565d;
    }
}
