/* ============================================================================
   nhf/red.css — token re-assignment for theme `red` (SUKJAI99) on top of
   nhf/theme-override.css. Loaded only when shell.theme === 'red', right after
   theme-override.css (head + end of body). Component rules stay shared; only
   the palette / type / radii / a few red-only grids change here.
   Red identity (themes/red.css): white base, #DC2626 accent, Prompt font,
   dark (#1a1a1a) topbar, radius 8–10.
   ========================================================================== */
:root {
  --nhf-red: #DC2626;
  --nhf-red-hi: #DC2626;
  --nhf-red-deep: #B91C1C;
  --nhf-red-ink: #7f1d1d;
  --nhf-red-soft: #FEF2F2;
  --nhf-red-line: rgba(220, 38, 38, .25);
  --nhf-gold: #F59E0B;
  --nhf-gold-deep: #D97706;
  --nhf-green: #16A34A;
  --nhf-green-deep: #15803D;
  --nhf-green-soft: #F0FDF4;
  --nhf-blue: #2563eb;
  --nhf-blue-deep: #1d4ed8;
  --nhf-ink: #111111;
  --nhf-ink-2: #333333;
  --nhf-muted: #777777;
  --nhf-muted-2: #9a9a9a;
  --nhf-paper: #ffffff;
  --nhf-paper-2: #F7F7F9;
  --nhf-paper-3: #EEEEF2;
  --nhf-line: rgba(0, 0, 0, .07);
  --nhf-line-2: #e2e2e6;
  --nhf-topbar-a: #1f1f1f;
  --nhf-topbar-b: #111111;
  --nhf-topbar-border: #DC2626;
  --nhf-marquee-bg: #1a1a1a;
  --nhf-footer-bg: #111111;
  --nhf-modal-head-a: #1f1f1f;
  --nhf-modal-head-b: #0f0f0f;
  --nhf-modal-bg: #F4F4F6;
  --nhf-main-bg: #ececf0;
  --nhf-card-border: #e3e3ea;
  --nhf-card-bar: #f6f6f8;
  --nhf-card-bar-text: #1a1a1a;
  --nhf-new-pill: #DC2626;
  --nhf-r-xs: 6px;
  --nhf-r-sm: 8px;
  --nhf-r: 10px;
  --nhf-r-lg: 14px;
  --nhf-r-xl: 16px;
  --nhf-shadow-1: 0 2px 8px rgba(0, 0, 0, .05);
  --nhf-shadow-2: 0 6px 24px rgba(0, 0, 0, .1);
  --nhf-ring: 0 0 0 3px rgba(220, 38, 38, .22);
  --nhf-font-display: 'Prompt', sans-serif;
  --nhf-font-body: 'Prompt', sans-serif;
}

/* red = white base: no dark texture / vignette */
.fixed-bg::after { display: none; }
html, body { color: var(--nhf-ink); }
/* topbar is dark in red: keep white glyphs, red hairline below */
.topnavbar { border-bottom: 2px solid var(--nhf-red) !important; box-shadow: 0 1px 10px rgba(0, 0, 0, .12) !important; }
.topnavbar::after { display: none; }
#re-credit .badge, .topnavbar .badge-light.thb { background: var(--nhf-red) !important; color: #fff !important; box-shadow: 0 2px 12px rgba(220, 38, 38, .25) !important; }
#menu-pc a { color: rgba(255, 255, 255, .6) !important; }
#menu-pc a:hover, #menu-pc a.active { background: rgba(255, 255, 255, .1) !important; }
.bar-powerball { border-bottom-color: rgba(220, 38, 38, .5) !important; }
/* main hero / actions (themes/red/main.php inline css) */
.r-hero { border-radius: var(--nhf-r-lg) !important; }
.r-actions .r-btn { min-height: 46px; border-radius: var(--nhf-r-sm) !important; font-weight: 600; }
/* menu grid: red main uses CSS grid .r-menu-grid (3 / 4 / 6) — keep counts, larger tiles */
.r-menu-grid { gap: 8px; }
.r-menu-grid a.menu-grid, .r-menu-grid a.menu-grid.hot, .r-menu-grid a.menu-grid.hothot { min-height: 92px !important; font-size: var(--nhf-fs-xs) !important; }
.r-menu-grid a.menu-grid i { font-size: 26px !important; }
.r-menu-grid a.menu-grid img { width: 30px !important; height: 30px !important; }
.r-menu-grid a.menu-grid .ribbon span { background: var(--nhf-red); border-radius: 0 0 6px 0; }
@media (min-width: 992px) { .r-menu-grid a.menu-grid { min-height: 104px !important; font-size: var(--nhf-fs-sm) !important; } }
/* red game grids — cards v2 (รูปที่ 2): the cover set `.r-game-grid-m` (2:3 covers) is shown on every viewport
   3 / 3 / 4 columns (<768 / 768–1199 / ≥1200 — mobile 2→3 per owner 2026-09-28) ; the landscape banner set `.r-game-grid` is hidden */
.r-game-grid-m { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; padding: 4px 0 !important; }
@media (min-width: 768px) { .r-game-grid-m { grid-template-columns: repeat(3, 1fr) !important; gap: 24px !important; } }
@media (min-width: 992px) { .r-game-grid { display: none !important; } .r-game-grid-m { display: grid !important; } }
@media (min-width: 1200px) { .r-game-grid-m { grid-template-columns: repeat(4, 1fr) !important; } }
/* the section that holds the cards takes the light-grey ground like default main */
.r-game-grid-m, .r-game-grid { background: transparent; }
.gc-page-icon { border-radius: var(--nhf-r) !important; }
/* pagemodal in red: dark head already via tokens; success head stays green */
.pagemodal .fixbot .col-6.bg-primary { background: #1a1a1a !important; }
.pagemodal #poy_list table td.bg-success.text-white { background: #1a1a1a !important; }
/* legacy red helpers used in prepare_poy (.bg-black/.text-gold/.border-right-gold) are neutralised by the shared input rule */
.pagemodal #poy_list table input.pl_price.bg-black { background: #fff !important; color: var(--nhf-ink) !important; }
/* section title accent in red */
.col-lotto > h3::before, .bgwhitealpha > h3::before, .lotto-title h4::before { background: var(--nhf-red); }
/* red deposit/withdraw grids (.ds-grid / .ws-*) — radius harmonised */
.ds-card, .ws-card { border-radius: var(--nhf-r-lg) !important; }
/* R24 (2026-10-03): การ์ด "ถอนยอดเกิน 3 แสนบาท" (M-Pay large withdraw) — โทนทอง/อำพัน */
.ws-card--large { border-color: #B45309 !important; box-shadow: 0 4px 14px rgba(180, 83, 9, .18) !important; }
.ws-card--large:hover { box-shadow: 0 8px 24px rgba(180, 83, 9, .30) !important; }
.ws-card--large .ws-card-icon { background: linear-gradient(135deg, #fef3c7, #fde68a) !important; }
.ws-card--large .ws-card-icon i { color: #B45309 !important; }
.ws-card--large .ws-card-title { color: #92400E !important; }
.ws-card--large .ws-card-badge { background: linear-gradient(135deg, #D97706, #B45309) !important; }
.ws-card-tag--large { background: linear-gradient(135deg, #D97706, #B45309) !important; }
/* red login (rl-*) */
.rl-form, .rl-card { border-radius: var(--nhf-r-lg) !important; }
/* R27 (2026-10-05): แบนเนอร์ A2HS บน red — การ์ดทองเหมือน default แต่ปุ่ม/ไอคอนโทนแดงเข้มของธีม */
.nhf-a2hs__icon, .nhf-a2hs__btn { background: #7f1d1d !important; color: #ffd34d !important; }
.nhf-a2hs__plus { border-color: #ffd34d !important; }
.nhf-a2hs-modal .nhf-step-n { background: #DC2626 !important; }
/* R106 (docs/task/59 — เจ้าของ 2026-10-15 02:50 "icon เล็กสุด"): มือถือ (< 768) .r-menu-grid 5 ใบ/แถวแบบกระชับ เหมือน default — ใบ/สี/ไอคอน/ริบบิ้นเดิม markup เดิม ;
   กริด 10 ช่อง: ใบปกติกว้าง 2 ช่อง (= 5 ใบ/แถว → 5 + 4 ; guest ไม่มี AF 5 + 3) ส่วน 2 ใบรายงาน (request/all + statement — เลือกด้วย href ไม่แตะ template) กว้าง 5 ช่อง
   = แถวสุดท้ายคู่กัน ไอคอนซ้าย-ชื่อขวา 48 px เหมือนปุ่มรายงานของ default (ชื่อยาว "รายงานการเงิน (3 วัน)" ในช่อง 67 px ถูกตัดบน Safari — พจนานุกรมไทยของ Apple
   ไม่แบ่ง "รายงาน|การเงิน") ; ตัวหนังสือ 11 → 16 px ; PC (≥ 768 → 4/6 คอลัมน์) ไม่เปลี่ยน ; ต้องอยู่ในไฟล์นี้เพราะ red.css โหลดหลัง theme-override.css */
@media (max-width: 767.98px) {
  .r-menu-grid { grid-template-columns: repeat(10, minmax(0, 1fr)) !important; gap: 3px !important; }
  div:has(> .r-menu-grid) { padding: 6px !important; } /* กล่องขาวครอบกริด (style inline padding:10px ในเทมเพลต) → ใบกว้าง 70 px เท่า default (67 px ทำให้ "แจ็คพอต" ขึ้น 2 บรรทัด) ; เบราว์เซอร์ไม่รู้จัก :has = คง 10 px */
  .r-menu-grid > a.menu-grid { grid-column: span 2; }
  .r-menu-grid a.menu-grid, .r-menu-grid a.menu-grid.hot, .r-menu-grid a.menu-grid.hothot { min-width: 0 !important; min-height: 64px !important; padding: 6px 2px 4px !important; gap: 2px !important; font-size: 16px !important; line-height: 1.05 !important; text-wrap: balance; }
  .r-menu-grid a.menu-grid i { font-size: 24px !important; }
  .r-menu-grid a.menu-grid img { width: 24px !important; height: 24px !important; }
  /* R258 (docs/task/184): ใบ "แทงบอล UFABET" (a.menu-grid.nhf-ufa) บนมือถือเหมือนธีม default (theme-override.css §R258): ตรา 28 px ไม่มี margin ใต้รูป (ชีตเดิม assets/css/themes/red.css ให้ a.menu-grid img margin-bottom 4 px) · gap 0 · padding 5 บน / 3 ล่าง
     → ใบ 71.6 px ไม่สูงกว่าใบ สร้างเลขชุด (74.6) แถวไม่สูงขึ้น ; ≥ 768 ตามกฎ img 30 px ของกริดแดงด้านบน + เงาจางจากกฎร่วม */
  .r-menu-grid a.menu-grid.nhf-ufa { gap: 0 !important; padding: 5px 2px 3px !important; }
  .r-menu-grid a.menu-grid img.nhf-ufa-ico { width: 28px !important; height: 28px !important; margin-bottom: 0 !important; }
  .r-menu-grid a.menu-grid .ribbon { transform: scale(.7); transform-origin: top left; }
  .r-menu-grid a.menu-grid .nhf-af-badge { top: 2px; right: 2px; left: 2px; justify-content: center; padding: 2px 3px; gap: 3px; font-size: 10px; }
  .r-menu-grid a.menu-grid.has-af-nudge { padding-top: 22px !important; }
  .r-menu-grid > a.menu-grid[href$="/member/request/all"], .r-menu-grid > a.menu-grid[href$="/member/statement"] { grid-column: span 5; flex-direction: row !important; min-height: 48px !important; gap: 8px !important; padding: 4px 6px !important; }
}
/* R217 (docs/task/151 — เจ้าของ 2026-10-26 "ปุ่มทายผลกับ minigame ของ L ขอเด่น ๆ แบบ R"): ใบทอง Minigame + ทายผล — สี/พิล/กฎร่วมอยู่ใน theme-override.css §R217 (a.menu-grid.hot.nhf-gold = ทองชุดเดียวกับการ์ด A2HS ของธีมนี้) ;
   ที่นี่เฉพาะ selector ของกริดแดงที่ต้องชนะ `.r-menu-grid a.menu-grid.hot` (0,3,1 !important) ด้านบน: ชื่อ 17 px บนแท็บเล็ต/PC · มือถือ 16 px + เลื่อนไอคอนลงพ้นพิล (64 px เท่าใบอื่น ; ใบแดงไม่มีแถว 5n+1) */
.r-menu-grid > a.menu-grid.hot.nhf-gold { font-size: 17px !important; }
@media (max-width: 767.98px) {
  .r-menu-grid > a.menu-grid.hot.nhf-gold { font-size: 16px !important; padding: 20px 0 2px !important; gap: 1px !important; }
  .r-menu-grid > a.menu-grid.hot.nhf-gold.nhf-mg { letter-spacing: -.8px; }
  .r-menu-grid > a.menu-grid.hot.nhf-gold .nhf-gold__badge { top: 2px; right: 2px; padding: 1px 6px; font-size: 10px; line-height: 14px; }
}
