/* ============================================================
 * Thai font — Anuphan Light  (every text element on Thai pages)
 *
 * Strategy:
 *   • Target only TEXT elements explicitly — never <i> (icon containers).
 *   • Never use universal `*` — keeps FontAwesome / Hotel Icons /
 *     LinearIcons working without restoration rules.
 *   • !important needed to override Bootstrap / theme.css /
 *     vendor CSS that set Josefin Sans on specific selectors.
 *
 * Font loading:
 *   • WOFF2 + TTF fallback, font-display: swap (no FOIT)
 *   • unicode-range restricts to Latin Basic + Thai
 *     → no download cost on CJK / RTL pages
 * ============================================================ */

@font-face {
    font-family: 'Anuphan';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/th/Anuphan-Light.woff2') format('woff2'),
         url('../fonts/th/Anuphan-Light.ttf')   format('truetype');
    unicode-range: U+0020-007E, U+0E01-0E7F;
}

/* ============================================================
 * Base — body inherits to most descendants
 * ============================================================ */
html[lang="th"],
html[lang="th"] body {
    font-family: 'Anuphan', 'Josefin Sans', -apple-system, BlinkMacSystemFont,
                 'Helvetica Neue', 'Sukhumvit Set', 'Thonburi', Tahoma, sans-serif !important;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
 * Explicit text-bearing elements — !important to override
 * Bootstrap / theme.css that set font-family per selector.
 * NOTE: <i> is deliberately NOT in this list so FontAwesome
 *       and other icon fonts continue to render their glyphs.
 * ============================================================ */
html[lang="th"] div,
html[lang="th"] p,
html[lang="th"] span,
html[lang="th"] a,
html[lang="th"] li,
html[lang="th"] ul,
html[lang="th"] ol,
html[lang="th"] dl, html[lang="th"] dt, html[lang="th"] dd,
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3,
html[lang="th"] h4, html[lang="th"] h5, html[lang="th"] h6,
html[lang="th"] button, html[lang="th"] input,
html[lang="th"] select, html[lang="th"] textarea,
html[lang="th"] optgroup, html[lang="th"] option,
html[lang="th"] label, html[lang="th"] fieldset, html[lang="th"] legend,
html[lang="th"] table, html[lang="th"] thead, html[lang="th"] tbody, html[lang="th"] tfoot,
html[lang="th"] tr, html[lang="th"] td, html[lang="th"] th,
html[lang="th"] section, html[lang="th"] article,
html[lang="th"] header, html[lang="th"] footer,
html[lang="th"] nav, html[lang="th"] main, html[lang="th"] aside,
html[lang="th"] form,
html[lang="th"] strong, html[lang="th"] em, html[lang="th"] b,
html[lang="th"] small, html[lang="th"] mark, html[lang="th"] sub, html[lang="th"] sup,
html[lang="th"] blockquote, html[lang="th"] pre, html[lang="th"] code,
html[lang="th"] cite, html[lang="th"] q,
html[lang="th"] address, html[lang="th"] time,
html[lang="th"] figcaption {
    font-family: 'Anuphan', 'Josefin Sans', -apple-system, BlinkMacSystemFont,
                 'Helvetica Neue', 'Sukhumvit Set', 'Thonburi', Tahoma, sans-serif !important;
}

/* ============================================================
 * Thai-tuned line-height (Thai chars have descenders + tone marks)
 * ============================================================ */
html[lang="th"] body { line-height: 1.65; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3,
html[lang="th"] h4, html[lang="th"] h5, html[lang="th"] h6 { line-height: 1.35; }
html[lang="th"] p, html[lang="th"] li { line-height: 1.7; }

/* ============================================================
 * Thai-tuned font-size — Anuphan Light renders ~10% smaller
 * visually than Latin Light at the same px. Bump base size
 * and key UI elements so Thai reads at parity with English.
 * ============================================================ */
html[lang="th"] body                                   { font-size: 14px; }
@media (min-width: 992px)  { html[lang="th"] body      { font-size: 16px; } }
@media (min-width: 1366px) { html[lang="th"] body      { font-size: 17px; } }

/* Body copy, lists */
html[lang="th"] p,
html[lang="th"] li,
html[lang="th"] dd,
html[lang="th"] td                                     { font-size: 1.02em; }

/* Navigation menu items — specific selectors used by this theme */
html[lang="th"] nav.navigation-main .navigation-block ul li a,
html[lang="th"] nav.navigation-main .navigation-block ul.navigation-right li a,
html[lang="th"] nav.navigation-main .navigation-block ul.navigation-left  li a
                                                       { font-size: 15px !important; }

@media (min-width: 1366px) {
  html[lang="th"] nav.navigation-main .navigation-block ul li a,
  html[lang="th"] nav.navigation-main .navigation-block ul.navigation-right li a,
  html[lang="th"] nav.navigation-main .navigation-block ul.navigation-left  li a
                                                       { font-size: 16px !important; }
}

/* Top header bar — TH / RESERVATIONS / phone number */
html[lang="th"] nav.navigation-top .navigation-top-right .box,
html[lang="th"] nav.navigation-top .navigation-top-right a,
html[lang="th"] nav.navigation-top .navigation-top-right .lang-switcher,
html[lang="th"] nav.navigation-top .navigation-top-left a
                                                       { font-size: 14px !important; }

/* Mega-panel dropdowns */
html[lang="th"] .mega-panel a,
html[lang="th"] .mega-panel .nav-name                  { font-size: 1.06em; }

/* Other nav fallbacks */
html[lang="th"] .nav-link,
html[lang="th"] .menu a,
html[lang="th"] .navbar a                              { font-size: 1.08em; }

/* Buttons & call-to-actions */
html[lang="th"] .btn,
html[lang="th"] button,
html[lang="th"] .btn-clean,
html[lang="th"] .ds-ov-btn,
html[lang="th"] .grd-cta                               { font-size: 1.05em; }

/* Form labels / inputs */
html[lang="th"] label,
html[lang="th"] .label,
html[lang="th"] input[type="text"],
html[lang="th"] input[type="email"],
html[lang="th"] select,
html[lang="th"] textarea                               { font-size: 1.05em; }

/* Captions / small uppercase labels (these are tightest — bump slightly more) */
html[lang="th"] small,
html[lang="th"] .small,
html[lang="th"] .eyebrow,
html[lang="th"] .label-sm,
html[lang="th"] .meta,
html[lang="th"] .dm-card-meta,
html[lang="th"] figcaption                             { font-size: 1.08em; }
