/* lang.css — Marathi on screen + the language button.
   Devanagari letters come from the bundled Poppins font (unicode-range), so
   English keeps its usual font and Marathi never shows as boxes. */
@font-face { font-family: "GS Devanagari"; font-weight: 400; font-display: swap; src: url("../fonts/Poppins-Regular.ttf") format("truetype"); unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+25CC, U+A8E0-A8FF; }
@font-face { font-family: "GS Devanagari"; font-weight: 500; font-display: swap; src: url("../fonts/Poppins-Medium.ttf") format("truetype"); unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+25CC, U+A8E0-A8FF; }
@font-face { font-family: "GS Devanagari"; font-weight: 600; font-display: swap; src: url("../fonts/Poppins-SemiBold.ttf") format("truetype"); unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+25CC, U+A8E0-A8FF; }
@font-face { font-family: "GS Devanagari"; font-weight: 700 800; font-display: swap; src: url("../fonts/Poppins-Bold.ttf") format("truetype"); unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+25CC, U+A8E0-A8FF; }

:root {
  --font-ui: "GS Devanagari", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Number font has no Marathi letters: headings in number columns borrow them; digits stay Consolas. */
  --font-num: "GS Devanagari", "Consolas", "SF Mono", "DejaVu Sans Mono", monospace;
}

/* Marathi selected: hide the page for the moment it takes to swap the text
   (i18n.js removes this class; a fallback timer shows the page regardless). */
html.gs-lang-pending body { visibility: hidden; }

/* The language button: same place on every screen, top-right. */
.lang-toggle {
  font-family: var(--font-ui); font-size: var(--fs-base, 14px); font-weight: 700; line-height: 1;
  min-height: 40px; padding: 0 14px; border-radius: var(--radius, 4px); cursor: pointer; white-space: nowrap;
  background: #fff; color: var(--c-navy, #1B3B6F); border: 2px solid #fff;
}
.lang-toggle:hover, .lang-toggle:focus-visible { background: var(--c-toolbar, #eef2f7); outline: 2px solid #fff; outline-offset: 1px; }
/* Signed-out screens (login, errors) have no header: pin it to the same corner. */
.lang-toggle-fixed { position: fixed; top: 10px; right: 12px; z-index: 1000; border-color: var(--c-navy, #1B3B6F); }

/* Marathi words are longer: let buttons, tabs and headings wrap instead of
   being cut off, and give the vowel signs above/below the line room. */
html[lang="mr"] body { line-height: 1.6; }
html[lang="mr"] .shell-nav a, html[lang="mr"] .btn-toolbar .tb-label strong { white-space: normal; }
html[lang="mr"] button, html[lang="mr"] .btn, html[lang="mr"] .btn-primary, html[lang="mr"] .btn-secondary,
html[lang="mr"] .btn-danger, html[lang="mr"] .btn-warn { white-space: normal; height: auto; min-height: var(--input-h, 36px); line-height: 1.35; }
html[lang="mr"] .data-grid th, html[lang="mr"] .grid th { white-space: normal; }
html[lang="mr"] .filter-field > span, html[lang="mr"] .form-field > span, html[lang="mr"] label { overflow-wrap: anywhere; }
html[lang="mr"] select { max-width: 100%; }
html[lang="mr"] .firm-select label { white-space: nowrap; }
/* Extra letter spacing (used for English capitals) pulls Marathi letters apart. */
html[lang="mr"] body * { letter-spacing: normal !important; }

@media print { .lang-toggle { display: none !important; } }
