/* Bengali reading rules, linked only from Bengali pages (<html lang="bn">). Every rule sits under :lang(bn), so an
   English page that ever loaded this file would not change. No web font: devices draw Bengali with their own fonts,
   named after the Latin families (Latin letters and digits keep their look), before the system fallbacks.
   !important is used where the rule must beat Astro's scoped selectors, which carry an attribute per compound and
   outrank a plain global rule. Tested in tests/unit/bn-css.test.ts. */

html:lang(bn) {
  --font-heading: 'Plus Jakarta Sans Variable', 'Plus Jakarta Sans Fallback', 'Noto Sans Bengali', 'Nirmala UI',
    'Vrinda', 'Kohinoor Bangla', 'Bangla Sangam MN', system-ui, sans-serif;
  --font-body: 'Inter Variable', 'Inter Fallback', 'Noto Sans Bengali', 'Nirmala UI', 'Vrinda', 'Kohinoor Bangla',
    'Bangla Sangam MN', system-ui, sans-serif;
}

/* Bengali vowel signs and conjuncts reach above and below the Latin line: taller lines. */
html:lang(bn) body { line-height: 1.7; }
html:lang(bn) h1,
html:lang(bn) h2,
html:lang(bn) h3,
html:lang(bn) summary,
html:lang(bn) .badge,
html:lang(bn) .verdict,
html:lang(bn) button,
html:lang(bn) label { line-height: 1.45 !important; }

/* Spacing between letters breaks Bengali conjuncts and headstrokes. Text marked English (lang="en": the APAX GATEWAY
   wordmark, photo credits, the company line) keeps the spacing it has on the English pages. */
html:lang(bn) *:not(:lang(en)) { letter-spacing: 0 !important; }

/* The wordmark is Latin: it keeps the English line height, so the logo looks the same on both languages. */
html:lang(bn) .wordmark { line-height: 1.55; }

/* The Bengali menu labels are longer than the English ones: below 1180 px the header uses the phone menu (brand left,
   Menu right; the links open below), as the English header does below 720 px, instead of wrapping into two or three
   rows. Copies the 720 px rules of src/components/Header.astro; !important beats its scoped selectors. */
@media (max-width: 1180px) {
  html:lang(bn) header .bar { min-height: 60px; gap: 0 12px; }
  html:lang(bn) header .menu { display: block !important; margin-left: auto; }
  html:lang(bn) header .menu summary {
    display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
    border: 1px solid var(--line-strong); border-radius: 10px; list-style: none; cursor: pointer;
    font: 600 0.9375rem var(--font-body); color: var(--navy);
  }
  html:lang(bn) header .menu summary::-webkit-details-marker { display: none; }
  html:lang(bn) header .menu[open] summary { background: var(--grey); }
  html:lang(bn) header nav,
  html:lang(bn) header .actions { display: none !important; }
  html:lang(bn) header .menu[open] ~ nav { display: flex !important; flex-direction: column; flex-basis: 100%; gap: 0; border-top: 1px solid var(--line); }
  html:lang(bn) header nav a { display: flex; align-items: center; min-height: 44px; font-size: 1rem; }
  html:lang(bn) header .menu[open] ~ .actions { display: flex !important; flex-basis: 100%; }
  html:lang(bn) header .currency { margin: 4px 0 12px; }
}
/* Above 1180 px the full Bengali menu must fit one row of the 1200 px container (it measured 1241 px at the English
   size and gaps): slightly smaller links and narrower gaps (about 1165 px). */
@media (min-width: 1181px) {
  html:lang(bn) header nav { gap: 16px !important; font-size: 0.875rem !important; }
  html:lang(bn) header .actions { gap: 12px !important; }
}
/* Below 720 px the fixed WhatsApp bar replaces the header link (as on English pages); above it the open menu keeps it. */
@media (max-width: 720px) {
  html:lang(bn) header .wa { display: none; }
}

/* Labels that wrap on a 320 px phone: no fixed heights; the existing min-height keeps the touch target, and a little
   padding above and below keeps a second line off the edges. .go is scoped to the selector: the arrival card guide
   and the e-visa hub use the same class name for their own links, which keep their own padding. */
html:lang(bn) .btn-apply,
html:lang(bn) .sticky-cta .btn-apply,
html:lang(bn) .selector .go { height: auto !important; padding-top: 8px !important; padding-bottom: 8px !important; }
html:lang(bn) .selector .cell { height: auto !important; min-height: 68px; padding-bottom: 10px !important; }
@media (max-width: 720px) {
  html:lang(bn) .selector .cell { min-height: 60px; }
}

/* The small cell labels: Bengali has no capitals, and its signs need a larger size to read. */
html:lang(bn) .cell-label { font-size: 0.8125rem !important; text-transform: none !important; }

/* The "Other passport? See our English pages" link under the Bengali selector (src/components/Selector.astro). Its rule
   lives here, not in the component, so the English pages' inline CSS stays as it was. */
html:lang(bn) .other-passport { margin: 8px 0 0; font-size: 0.9375rem; }

/* The price card total (src/components/visa/PriceCard.astro): "254.00 সিঙ্গাপুর ডলার" is far longer than S$254.00 and,
   kept on one line, pushed the page wider than a 320 px screen. It may wrap between the amount and the currency. */
html:lang(bn) .total span:last-child { white-space: normal !important; text-align: right; }
