/*
 * Theme-aware footer polish.
 * Loaded last so the homepage's mobile footer override and dynamically-injected
 * cookie controls follow the selected Fixonic theme instead of staying dark.
 */

html[data-theme="light"] .site-footer {
    color: #344054 !important;
    border-top-color: #d9e1ea !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(54, 101, 243, .045), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0%, #f3f6f9 100%) !important;
}

html[data-theme="light"] .site-footer .footer-grid h2,
html[data-theme="light"] .site-footer .brand-footer,
html[data-theme="light"] .site-footer .brand-footer strong,
html[data-theme="light"] .site-footer .fixonic-wordmark strong,
html[data-theme="light"] .site-footer .footer-independent-repair-copy strong {
    color: #101828 !important;
}

html[data-theme="light"] .site-footer .fixonic-wordmark small,
html[data-theme="light"] .site-footer .footer-grid > div:first-child p,
html[data-theme="light"] .site-footer .footer-grid > div:last-child p,
html[data-theme="light"] .site-footer .footer-independent-repair-copy span,
html[data-theme="light"] .site-footer .footer-bottom {
    color: #667085 !important;
}

html[data-theme="light"] .site-footer .footer-grid a,
html[data-theme="light"] .site-footer .footer-legal-links a,
html[data-theme="light"] .site-footer .footer-independent-repair-nav a {
    color: #475467 !important;
}

html[data-theme="light"] .site-footer .footer-grid a:hover,
html[data-theme="light"] .site-footer .footer-grid a:focus-visible,
html[data-theme="light"] .site-footer .footer-legal-links a:hover,
html[data-theme="light"] .site-footer .footer-legal-links a:focus-visible,
html[data-theme="light"] .site-footer .footer-independent-repair-nav a:hover,
html[data-theme="light"] .site-footer .footer-independent-repair-nav a:focus-visible {
    color: #2857d9 !important;
}

html[data-theme="light"] .site-footer .footer-legal-links,
html[data-theme="light"] .site-footer .footer-independent-repair-links,
html[data-theme="light"] .site-footer .footer-bottom {
    border-color: #d9e1ea !important;
}

html[data-theme="light"] .site-footer .footer-legal-links {
    color: #475467 !important;
}

html[data-theme="light"] .site-footer .fx-cookie-settings {
    color: #344054 !important;
    border: 1px solid #98a2b3 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

html[data-theme="light"] .site-footer .fx-cookie-settings:hover,
html[data-theme="light"] .site-footer .fx-cookie-settings:focus-visible {
    color: #1d4ed8 !important;
    border-color: #6b8cff !important;
    background: #f8faff !important;
}

/* The homepage intentionally reveals the full footer on mobile. Keep its
   layout rules, but let this final stylesheet own its light-mode palette. */
@media (max-width: 900px) {
    html[data-theme="light"] .app-route-home .desktop-footer {
        color: #344054 !important;
        border-top-color: #d9e1ea !important;
        background:
            radial-gradient(circle at 12% 2%, rgba(54, 101, 243, .045), transparent 22rem),
            linear-gradient(180deg, #f8fafc 0%, #f3f6f9 100%) !important;
    }
}

/* Preserve the premium dark footer when dark mode is selected. */
html[data-theme="dark"] .site-footer {
    color: var(--fx-text-soft) !important;
    border-top-color: var(--fx-line) !important;
    background: var(--fx-bg-soft) !important;
}

html[data-theme="dark"] .site-footer .footer-legal-links,
html[data-theme="dark"] .site-footer .footer-independent-repair-links,
html[data-theme="dark"] .site-footer .footer-bottom {
    border-color: var(--fx-line) !important;
}

html[data-theme="dark"] .site-footer .fx-cookie-settings {
    color: var(--fx-text) !important;
    border-color: var(--fx-line-strong) !important;
    background: var(--fx-panel) !important;
}


/* Footer cookie settings must read as a legal text link, not a pill button. */
.site-footer .footer-legal-links .fx-cookie-settings {
    appearance: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}
.site-footer .footer-legal-links .fx-cookie-settings:hover,
.site-footer .footer-legal-links .fx-cookie-settings:focus-visible {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}
html[data-theme="light"] .site-footer .footer-legal-links .fx-cookie-settings {
    color: #475467 !important;
}
html[data-theme="light"] .site-footer .footer-legal-links .fx-cookie-settings:hover,
html[data-theme="light"] .site-footer .footer-legal-links .fx-cookie-settings:focus-visible {
    color: #2857d9 !important;
}
html[data-theme="dark"] .site-footer .footer-legal-links .fx-cookie-settings {
    color: var(--fx-text) !important;
}
