/* =====================================================================
   GovStaff Pro - Multilingual font fallbacks
   Loaded after app.css so it overrides font-family chains where needed.
   ===================================================================== */

/* English (default) - already in app.css */

/* Sinhala - apply when <html lang="si"> */
html[lang="si"] body,
html[lang="si"] input,
html[lang="si"] select,
html[lang="si"] textarea,
html[lang="si"] button {
    font-family: 'Noto Sans Sinhala', 'Inter', sans-serif;
}
html[lang="si"] h1, html[lang="si"] h2, html[lang="si"] h3,
html[lang="si"] .card-title-large, html[lang="si"] .kpi-value,
html[lang="si"] .topbar h1 {
    font-family: 'Noto Sans Sinhala', 'Playfair Display', Georgia, serif;
}

/* Tamil - apply when <html lang="ta"> */
html[lang="ta"] body,
html[lang="ta"] input,
html[lang="ta"] select,
html[lang="ta"] textarea,
html[lang="ta"] button {
    font-family: 'Noto Sans Tamil', 'Inter', sans-serif;
}
html[lang="ta"] h1, html[lang="ta"] h2, html[lang="ta"] h3,
html[lang="ta"] .card-title-large, html[lang="ta"] .kpi-value,
html[lang="ta"] .topbar h1 {
    font-family: 'Noto Sans Tamil', 'Playfair Display', Georgia, serif;
}

/* Language switcher in topbar */
.lang-switcher {
    position: relative;
    display: inline-block;
}
.lang-switcher .current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 12.5px;
    cursor: pointer;
    text-decoration: none;
}
.lang-switcher .current:hover { background: var(--panel-2); color: var(--text); }
.lang-switcher .menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    min-width: 160px;
    z-index: 30;
    overflow: hidden;
}
.lang-switcher.open .menu { display: block; }
.lang-switcher .menu a {
    display: block;
    padding: 10px 14px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.lang-switcher .menu a:last-child { border-bottom: 0; }
.lang-switcher .menu a:hover { background: var(--panel-2); }
.lang-switcher .menu a.active { background: rgba(212,168,87,.12); color: var(--gold); font-weight: 600; }
