/* ============================================================
   Dhivehi / Thaana Language Support
   Font: Faruma (bundled in assets/fonts/Faruma.ttf)
   ============================================================ */

@font-face {
    font-family: 'Faruma';
    src: url('../fonts/Faruma.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Applied to individual translated nodes — does NOT flip the whole layout */
.dv-text {
    font-family: 'Faruma', 'MV Boli', serif !important;
    direction: rtl;
    unicode-bidi: embed;
    letter-spacing: 0 !important;
}

/* Language toggle button */
#lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    letter-spacing: 0.03em;
    line-height: 1.4;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
#lang-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.75);
    color: #fff !important;
}
#lang-toggle-btn:active {
    background: rgba(255, 255, 255, 0.28);
}
#lang-toggle-btn .lang-divider {
    opacity: 0.35;
    font-weight: 300;
    font-size: 0.7rem;
    margin: 0 0.1rem;
}
#lang-toggle-btn .dv-text {
    font-size: 0.85rem;
    direction: rtl;
    opacity: 0.85;
}

/* When Dhivehi is active, render the page font in Faruma for
   the body text only (not inputs/code) so tour names &
   descriptions typed in Thaana display correctly */
body.lang-dv {
    font-family: 'Faruma', 'MV Boli', serif;
}
body.lang-dv input,
body.lang-dv textarea,
body.lang-dv select,
body.lang-dv code,
body.lang-dv pre {
    font-family: inherit;
}
