/**
 * Accessibility Fixes for WCAG 2.1 Level AA Compliance
 * Focus: Color Contrast
 * Date: October 22, 2025
 */

/* ==========================================================================
   SKIP LINK
   ========================================================================== */
.sr-only:focus,
.sr-only.focus\:not-sr-only:focus {
    background-color: #0369a1 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   APP SWITCHER
   ========================================================================== */
.app-switcher-item.active {
    background-color: #eff6ff !important;
    color: #075985 !important;
}

.app-switcher-item.active .app-name {
    color: #075985 !important;
}

.app-switcher-item.active .app-check {
    color: #075985 !important;
}

/* ==========================================================================
   NAVIGATION ACTIVE STATE
   ========================================================================== */
:root {
    --sidebar-nav-item-active-color: #3b82f6;
    --sidebar-nav-item-active-bg: #eff6ff;
}

.nav-item-mintlify.active {
    color: #3b82f6 !important;
    background: #eff6ff !important;
    font-weight: 500;
}

.nav-link.active {
    color: #3b82f6 !important;
    background: #eff6ff !important;
}

/* ==========================================================================
   MAIN CONTENT LINKS - Lighthouse fixes
   ========================================================================== */
main.flex-1.max-w-4xl.px-6.pt-8.pb-8 .prose a:not(.toc-link):not(.content-footer-link),
main.flex-1.max-w-4xl.px-6.pt-8.pb-8 article a:not(.toc-link):not(.content-footer-link),
main.flex-1.max-w-4xl .prose a:not(.toc-link):not(.content-footer-link),
main.flex-1.max-w-4xl article a:not(.toc-link):not(.content-footer-link),
.prose.prose-lg a:not(.toc-link):not(.content-footer-link) {
    color: #0369a1 !important; /* 5.93:1 contrast */
    font-weight: 600 !important; /* Distinguishable by more than color */
}

/* ==========================================================================
   CODE BLOCKS
   ========================================================================== */
pre {
    background: #0f172a !important;
}

code {
    color: #e5e7eb;
}

/* ==========================================================================
   DARK MODE
   ========================================================================== */
html[data-theme="dark"] {
    --sidebar-nav-item-active-color: #7dd3fc;
    --sidebar-nav-item-active-bg: #1e3a8a;
}

html[data-theme="dark"] .app-switcher-item.active,
body.dark-theme .app-switcher-item.active {
    background-color: #1e3a8a !important;
    color: #7dd3fc !important;
}

html[data-theme="dark"] .app-switcher-item.active .app-name,
body.dark-theme .app-switcher-item.active .app-name {
    color: #7dd3fc !important;
}

html[data-theme="dark"] .nav-item-mintlify.active,
body.dark-theme .nav-item-mintlify.active {
    color: #7dd3fc !important;
    background: #1e3a8a !important;
}

html[data-theme="dark"] main.flex-1.max-w-4xl.px-6.pt-8.pb-8 .prose a:not(.toc-link):not(.content-footer-link),
html[data-theme="dark"] main.flex-1.max-w-4xl.px-6.pt-8.pb-8 article a:not(.toc-link):not(.content-footer-link),
html[data-theme="dark"] main.flex-1.max-w-4xl .prose a:not(.toc-link):not(.content-footer-link),
html[data-theme="dark"] main.flex-1.max-w-4xl article a:not(.toc-link):not(.content-footer-link),
html[data-theme="dark"] .prose.prose-lg a:not(.toc-link):not(.content-footer-link),
body.dark-theme main.flex-1.max-w-4xl.px-6.pt-8.pb-8 .prose a:not(.toc-link):not(.content-footer-link),
body.dark-theme main.flex-1.max-w-4xl.px-6.pt-8.pb-8 article a:not(.toc-link):not(.content-footer-link),
body.dark-theme main.flex-1.max-w-4xl .prose a:not(.toc-link):not(.content-footer-link),
body.dark-theme main.flex-1.max-w-4xl article a:not(.toc-link):not(.content-footer-link),
body.dark-theme .prose.prose-lg a:not(.toc-link):not(.content-footer-link) {
    color: #60a5fa !important; /* 7.04:1 contrast */
    font-weight: 600 !important;
}

/* ==========================================================================
   RESOURCE CARDS
   ========================================================================== */
.resource-card p {
    color: #4b5563 !important;
}

.resource-card h3 {
    color: #111827 !important;
}

.resource-link {
    color: #075985 !important;
}

.resource-link:hover {
    color: #0369a1 !important;
}

[data-theme="dark"] .resource-card p,
body.dark-theme .resource-card p {
    color: #9ca3af !important;
}

[data-theme="dark"] .resource-card h3,
body.dark-theme .resource-card h3 {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .resource-link,
body.dark-theme .resource-link {
    color: #7dd3fc !important;
}

[data-theme="dark"] .resource-link:hover,
body.dark-theme .resource-link:hover {
    color: #38bdf8 !important;
}
