/*
 | Thaana — the fonts VIYA renders Dhivehi in.
 |
 | MV Faseyha first: the body face the thaana-web-design skill recommends, with
 | a real bold (Filament sets table and label text at 500–600, and faked bold
 | smears the fili). By Hassan Hameed, "may be used for all legitimate
 | purposes" (MV-Faseyha-README.txt); files from the fonts.mv essentials kit.
 | The *-override values are its line-metric fixes from fonts.mv/fonts.json.
 |
 | Noto Sans Thaana (OFL 1.1, OFL.txt) is the fallback: Google Fonts' `thaana`
 | subset, which also covers the Arabic-script punctuation Dhivehi borrows and
 | the dotted circle a bare fili renders on.
 |
 | Not Faruma, which the legacy app names in markup: its licence is
 | unspecified, so we cannot ship it.
 |
 | Published by `php artisan filament:assets` to `public/fonts/viya/thaana/`,
 | which is where the `url()`s below resolve from. Registered in
 | App\Modules\Platform\PlatformServiceProvider.
 */

@font-face {
    font-family: 'MV Faseyha';
    font-weight: 400;
    font-display: swap;
    src: url('mv-faseyha-400.woff2') format('woff2');
    unicode-range: U+0780-07BF;
    ascent-override: 86.47%;
    descent-override: 45.8%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'MV Faseyha';
    font-weight: 700;
    font-display: swap;
    src: url('mv-faseyha-700.woff2') format('woff2');
    unicode-range: U+0780-07BF;
    ascent-override: 80.42%;
    descent-override: 49.51%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'Noto Sans Thaana';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('NotoSansThaana-thaana.woff2') format('woff2');
    unicode-range: U+060C, U+061B-061C, U+061F, U+0660-066C, U+0780-07B1, U+200C-200F, U+25CC, U+FDF2, U+FDFD;
}

/*
 | The one class that makes something Thaana. Put on an <input>, a table cell or
 | an infolist entry by App\Modules\Platform\Filament\Forms\ThaanaInput and its
 | table and infolist counterparts — never on a page or a panel: the UI language
 | is English (CLAUDE.md non-negotiable #5) and only the *field* is Dhivehi.
 |
 | The Latin fallbacks matter: a Dhivehi column frequently holds a romanised
 | name, a number or nothing at all. Both Thaana faces are limited by
 | unicode-range, so those go to the panel's own font, which is listed before
 | Noto so Noto's Arabic-Indic digits never stand in for ours.
 */
.viya-thaana {
    font-family: 'MV Faseyha', var(--font-family), 'Noto Sans Thaana', ui-sans-serif, system-ui, sans-serif;
    /* Thaana's fili sit above and below the letter; the default leading clips
       them in a table row. */
    line-height: 2;
    font-synthesis: none;
    /* Spaces come from the Latin font, about half a Thaana space. */
    word-spacing: 0.2em;
}

/* A right-aligned input still shows its placeholder from the right, which is
   what someone typing Dhivehi expects. */
.viya-thaana::placeholder {
    text-align: right;
}
