/* Fallback CSS for when Vite manifest is not available */
:root {
    --font-scale: 1;
}
html {
    font-size: calc(16px * var(--font-scale));
}
.high-contrast,
.theme-high-contrast {
    filter: contrast(120%) saturate(120%);
}
/* Barra de acessibilidade */
.accessibility-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.accessibility-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.accessibility-btn,
.accessibility-bar button[data-action] {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #e5e7eb;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.accessibility-btn i,
.accessibility-bar button[data-action] i {
    font-size: 1.1rem;
}
.accessibility-btn.active,
.accessibility-bar button[data-action^="theme-"].active {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}
.accessibility-languages {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.language-picker {
    position: relative;
}
.language-toggle img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.language-menu {
    display: flex;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px 5px 4px 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    flex-direction: column;
    gap: 3px;
    align-items: center;
    width: 48px;
    opacity: 0;
    transform: translateY(-6px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.2s ease;
    z-index: 200;
}
.language-menu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 0;
    width: 100%;
    height: 8px;
}
.language-picker.open .language-menu,
.language-picker:hover .language-menu,
.language-picker:focus-within .language-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.flag-form {
    margin: 0;
}
.flag-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
}
.flag-btn img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}
.flag-btn.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.theme-dark .accessibility-btn,
.dark .accessibility-btn,
.theme-dark .accessibility-bar button[data-action],
.dark .accessibility-bar button[data-action],
.theme-dark .flag-btn,
.dark .flag-btn,
.theme-dark .language-toggle,
.dark .language-toggle {
    background: #1f2937;
    border-color: #334155;
    color: #e2e8f0;
}
.theme-dark .language-menu,
.dark .language-menu {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.7);
}
.theme-dark .language-menu .flag-btn,
.dark .language-menu .flag-btn {
    background: #0f172a;
    border-color: #334155;
}
.theme-high-contrast .accessibility-btn,
.high-contrast .accessibility-btn,
.theme-high-contrast .accessibility-bar button[data-action],
.high-contrast .accessibility-bar button[data-action],
.theme-high-contrast .flag-btn,
.high-contrast .flag-btn,
.theme-high-contrast .language-toggle,
.high-contrast .language-toggle {
    background: #000;
    border-color: #facc15;
    color: #facc15;
}
.theme-high-contrast .language-menu,
.high-contrast .language-menu {
    background: #111;
    border-color: #facc15;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
}
.theme-high-contrast .language-menu .flag-btn,
.high-contrast .language-menu .flag-btn {
    background: #000;
    border-color: #facc15;
}

/* =====================
   Theme overrides
   ===================== */
/* Dark mode: all font colors should be light (#f9f9f9) */
.theme-dark,
.dark {
    color: #f9f9f9 !important;
}
.theme-dark a,
.dark a,
.theme-dark a:hover,
.dark a:hover,
.theme-dark a:visited,
.dark a:visited,
.theme-dark a:active,
.dark a:active,
.theme-dark a:focus,
.dark a:focus {
    color: #f9f9f9 !important;
}
/* Common text elements in dark */
.theme-dark h1,
.dark h1,
.theme-dark h2,
.dark h2,
.theme-dark h3,
.dark h3,
.theme-dark h4,
.dark h4,
.theme-dark h5,
.dark h5,
.theme-dark h6,
.dark h6,
.theme-dark p,
.dark p,
.theme-dark span,
.dark span,
.theme-dark label,
.dark label,
.theme-dark li,
.dark li,
.theme-dark dt,
.dark dt,
.theme-dark dd,
.dark dd,
.theme-dark small,
.dark small,
.theme-dark strong,
.dark strong,
.theme-dark em,
.dark em {
    color: #f9f9f9 !important;
}

/* High contrast: black backgrounds, white text, yellow accents */
.theme-high-contrast,
.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}
/* Force main layout surfaces to black */
.theme-high-contrast body,
.theme-high-contrast header,
.theme-high-contrast nav,
.theme-high-contrast main,
.theme-high-contrast section,
.theme-high-contrast aside,
.theme-high-contrast footer,
.theme-high-contrast .container,
.theme-high-contrast .content,
.theme-high-contrast .card,
.theme-high-contrast .modal,
.theme-high-contrast .dropdown-menu,
.theme-high-contrast .bg-white,
.theme-high-contrast [class*="bg-neutral"],
.theme-high-contrast [class*="bg-dark"],
.theme-high-contrast [class*="bg-"] {
    background-color: #000 !important;
    color: #fff !important;
}
/* Buttons: black with yellow border */
.theme-high-contrast .btn,
.theme-high-contrast button {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #ff0 !important;
}
/* Links: yellow in all states */
.theme-high-contrast a,
.theme-high-contrast a:hover,
.theme-high-contrast a:visited,
.theme-high-contrast a:active,
.theme-high-contrast a:focus {
    color: #ff0 !important;
    text-decoration: underline;
}
/* Form controls */
.theme-high-contrast input,
.theme-high-contrast select,
.theme-high-contrast textarea {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #ff0 !important;
}
.theme-high-contrast ::placeholder {
    color: #ddd !important;
}
