/*
 * Thai typography for www.wmc.co.th
 *
 * Loaded by Thai pages only (html lang="th"). Every rule below starts with html[lang="th"],
 * so nothing here can reach an English page even if this file were loaded by mistake.
 * Typeface: IBM Plex Sans Thai, self-hosted, weights 400, 500 and 600 only.
 */

/* ---------- Font files (WOFF2, OFL licence) ---------- */
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-thai-400-thai.woff2) format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-thai-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-thai-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-thai-500-thai.woff2) format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-thai-500-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-thai-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-thai-600-thai.woff2) format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-thai-600-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-thai-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Base: one Thai family everywhere on Thai pages ---------- */
html[lang="th"] {
  --th-font: "IBM Plex Sans Thai", "Leelawadee UI", Tahoma, "Noto Sans Thai", Thonburi, system-ui, sans-serif;
}
html[lang="th"] body {
  font-family: var(--th-font);
  font-size: 1.0625rem;          /* 17px */
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: normal;
  line-break: strict;            /* keeps Thai from breaking before vowels and tone marks */
  word-break: normal;
  overflow-wrap: break-word;
}
html[lang="th"] .font-serif,
html[lang="th"] .font-sans,
html[lang="th"] blockquote,
html[lang="th"] input,
html[lang="th"] select,
html[lang="th"] textarea,
html[lang="th"] button { font-family: var(--th-font); }

/* ---------- Headings ---------- */
html[lang="th"] h1,
html[lang="th"] h2,
html[lang="th"] h3 {
  font-family: var(--th-font);
  letter-spacing: normal;
  text-wrap: wrap;               /* balance/pretty make Chrome re-measure Thai text again and again and can hang the page */
  line-break: strict;
}
html[lang="th"] h1 {
  font-weight: 600;
  font-size: clamp(1.9rem, 1.25rem + 2.3vw, 2.9rem);   /* 30px on phones, 46px on a 1440px screen */
  line-height: 1.3;
}
html[lang="th"] h2 {
  font-weight: 500;
  font-size: clamp(1.625rem, 1.2rem + 1.3vw, 2.1rem);  /* 26px to 34px */
  line-height: 1.35;
}
html[lang="th"] h3 {
  font-weight: 500;
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.45;
}
html[lang="th"] .prose-wmc h2 { font-size: clamp(1.625rem, 1.3rem + 0.9vw, 1.9rem) !important; }
html[lang="th"] .prose-wmc h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem); }
html[lang="th"] summary h3 { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); line-height: 1.5; }

/* ---------- Body copy ---------- */
html[lang="th"] .prose-wmc { font-size: 1.0625rem; line-height: 1.78; max-width: 42rem; }
html[lang="th"] p,
html[lang="th"] li { text-wrap: wrap; }
html[lang="th"] strong,
html[lang="th"] b { font-weight: 600; }

/* ---------- Small caps-style labels: Thai has no capitals and no tracking ---------- */
html[lang="th"] .eyebrow { font-size: 0.85rem; font-weight: 500; letter-spacing: normal; text-transform: none; }
html[lang="th"] [class*="tracking-"] { letter-spacing: normal !important; }
html[lang="th"] [class*="uppercase"] { text-transform: none !important; }

/* Very small Latin-sized text is too small for Thai glyphs: lift it to a readable size */
html[lang="th"] [class*="text-[0.6"],
html[lang="th"] [class*="text-[0.7"] { font-size: 0.85rem !important; }
html[lang="th"] [class*="text-[0.8"] { font-size: 0.92rem !important; }
html[lang="th"] [class*="text-[0.9"] { font-size: 1rem !important; }

/* ---------- Navigation, buttons, forms ---------- */
html[lang="th"] header nav a,
html[lang="th"] header summary { font-weight: 500; }
html[lang="th"] header nav a { font-size: 0.95rem !important; }
html[lang="th"] a[class*="h-10"][class*="px-5"],
html[lang="th"] a[class*="h-11"][class*="px-"],
html[lang="th"] a[class*="h-12"][class*="px-6"],
html[lang="th"] button[type="submit"] { font-weight: 500; font-size: 0.95rem !important; }
html[lang="th"] label { font-weight: 500; font-size: 0.95rem !important; }
html[lang="th"] input,
html[lang="th"] select,
html[lang="th"] textarea { font-size: 1rem; line-height: 1.5; }   /* 16px: phones do not zoom into the field */
html[lang="th"] input::placeholder,
html[lang="th"] textarea::placeholder { font-family: var(--th-font); }

/* ---------- Tables ---------- */
html[lang="th"] table { font-size: 0.97rem !important; }
html[lang="th"] th { font-weight: 600 !important; }
html[lang="th"] td { line-height: 1.65; }

/* ---------- Footer and cookie banner ---------- */
html[lang="th"] footer { font-size: 0.95rem; }
html[lang="th"] .wmc-consent,
html[lang="th"] .wmc-consent button { font-family: var(--th-font); font-size: 0.97rem; line-height: 1.65; }
html[lang="th"] .wmc-consent button { font-weight: 500; }

@media (max-width:639px){.hb{display:none}}
