/* ═══════════════════════════════════════════════════════════════
   MMDO 2028 — Global Responsive Styles
   Covers: Android phones, iPhones, tablets, all screen sizes
   Breakpoints:
     xs  : max 374px  — small Android (Galaxy A, Moto E)
     sm  : max 480px  — standard phones (iPhone SE, Pixel)
     md  : max 640px  — large phones (iPhone Plus, Galaxy S)
     lg  : max 768px  — small tablets (iPad Mini portrait)
     xl  : max 1024px — tablets (iPad portrait, Surface)
═══════════════════════════════════════════════════════════════ */

/* ── BASE MOBILE FIXES ── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video { max-width: 100%; height: auto; }
input, select, textarea, button { font-size: 16px !important; } /* prevents iOS zoom on focus */
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a     { -webkit-tap-highlight-color: transparent; }

/* ── NAVIGATION ── */
@media (max-width: 768px) {
  nav { padding: 0 16px !important; height: 56px !important; }
}
@media (max-width: 480px) {
  nav { padding: 0 12px !important; height: 52px !important; }
  .nav-brand, .nav-logo { font-size: 11px !important; letter-spacing: 1px !important; }
}

/* ── WRAP / CONTAINER ── */
@media (max-width: 768px) {
  .wrap { padding: 24px 16px 80px !important; }
}
@media (max-width: 480px) {
  .wrap { padding: 16px 12px 80px !important; }
}

/* ── PAYMENT PAGE — PLAN CARDS ── */
@media (max-width: 768px) {
  .plans { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .plan-price { font-size: 22px !important; }
  .plan-name  { font-size: 11px !important; letter-spacing: 1px !important; }
  .plan-card  { padding: 16px !important; }
}
@media (max-width: 540px) {
  .plans { grid-template-columns: 1fr !important; gap: 10px !important; }
  .plan-card { padding: 18px !important; }
  .plan-price { font-size: 26px !important; }
}
@media (max-width: 374px) {
  .plan-card { padding: 14px !important; }
  .plan-price { font-size: 22px !important; }
  .plan-icon  { font-size: 24px !important; }
}

/* ── PAYMENT PAGE — TOTAL AMOUNT ── */
@media (max-width: 768px) {
  .pay-total { font-size: 36px !important; }
}
@media (max-width: 480px) {
  .pay-total { font-size: 30px !important; }
}
@media (max-width: 374px) {
  .pay-total { font-size: 26px !important; }
}

/* ── PAYMENT PAGE — FORM GRID ── */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr !important; gap: 0 !important; }
  .pay-form  { padding: 18px 14px !important; border-radius: 14px !important; }
}
@media (max-width: 374px) {
  .pay-form { padding: 14px 10px !important; }
}

/* ── PAYMENT PAGE — SECURITY BADGES ── */
@media (max-width: 480px) {
  .security-badges { gap: 6px !important; }
  .sec-badge { font-size: 9px !important; padding: 5px 8px !important; }
}

/* ── PAYMENT PAGE — PAY BUTTON ── */
@media (max-width: 480px) {
  .pay-btn { font-size: 11px !important; letter-spacing: 2px !important; padding: 14px 12px !important; }
}

/* ── SCHEDULE ROWS ── */
@media (max-width: 480px) {
  .schedule-row { flex-wrap: wrap !important; gap: 4px !important; font-size: 11px !important; }
  .schedule-row > * { flex: 1 1 40% !important; }
}

/* ── LOGIN PAGE ── */
@media (max-width: 640px) {
  .lbox { padding: 24px 18px !important; border-radius: 16px !important; }
}
@media (max-width: 374px) {
  .lbox { padding: 20px 14px !important; }
}

/* ── LINKS GRID (contestant portal) ── */
@media (max-width: 480px) {
  .links-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .link-card  { padding: 12px 8px !important; font-size: 11px !important; }
}
@media (max-width: 340px) {
  .links-grid { grid-template-columns: 1fr !important; }
}

/* ── SCHEDULE / TABLE ROWS ── */
@media (max-width: 640px) {
  .receipt-box  { padding: 16px 14px !important; }
  .receipt-row  { font-size: 11px !important; }
}

/* ── NOTIFICATION TOAST ── */
@media (max-width: 480px) {
  .notif { bottom: 16px !important; right: 12px !important; left: 12px !important;
           max-width: 100% !important; font-size: 12px !important; }
}

/* ── COOKIE BANNER ── */
@media (max-width: 480px) {
  #mmdo-cookie { padding: 12px 14px !important; flex-direction: column !important; gap: 10px !important; }
  #mmdo-cookie p { font-size: 11px !important; }
  .mmdo-cookie-btns { width: 100% !important; justify-content: flex-end !important; }
}

/* ── HOME PAGE HERO ── */
@media (max-width: 768px) {
  .hero-title, h1.hero-title { font-size: clamp(24px, 7vw, 48px) !important; }
  .hero-sub { font-size: 14px !important; }
}
@media (max-width: 480px) {
  .hero-title, h1.hero-title { font-size: clamp(20px, 8vw, 36px) !important; }
}

/* ── ADMIN / CARD GRIDS ── */
@media (max-width: 768px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important; gap: 10px !important; }
  .card { padding: 16px !important; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .card { padding: 12px 10px !important; }
  .card-name { font-size: 9px !important; }
}
@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr !important; }
}

/* ── PWA FAB ── */
@media (max-width: 480px) {
  #pwa-fab { bottom: 16px !important; right: 12px !important;
             font-size: 11px !important; padding: 12px 14px 12px 12px !important; }
}

/* ── PWA MODAL ── */
#pwa-overlay { z-index: 10000000 !important; }
#pwa-modal   { z-index: 10000002 !important; }
@media (max-width: 480px) {
  #pwa-modal { padding: 20px 14px 32px !important; }
}

/* ── INTRO SCREEN (index.html) ── */
@media (max-width: 480px) {
  .enter-btn { font-size: 11px !important; letter-spacing: 3px !important;
               padding: 12px 36px !important; bottom: 8% !important; }
  .hero-crown { font-size: 56px !important; }
  .hero-title-main { font-size: 18px !important; letter-spacing: 3px !important; }
}
@media (max-width: 374px) {
  .enter-btn { font-size: 10px !important; padding: 10px 28px !important; }
  .hero-crown { font-size: 48px !important; }
}

/* ── GENERAL BUTTON SIZING ON SMALL PHONES ── */
@media (max-width: 374px) {
  button, .btn, [class*="-btn"] {
    min-height: 42px;
    font-size: 10px !important;
  }
}

/* ── TAB / SECTION TITLES ── */
@media (max-width: 480px) {
  [style*="letter-spacing:3px"], [style*="letter-spacing: 3px"] {
    letter-spacing: 1px !important;
  }
}

/* ── OVERFLOW GUARD — prevents horizontal scroll ── */
@media (max-width: 768px) {
  .section, .pay-form, .lbox, .info-card, .status-card, .travel-box {
    word-break: break-word;
  }
}

/* ── TABLET OPTIMIZATIONS ── */
@media (min-width: 641px) and (max-width: 1024px) {
  .wrap { max-width: 700px !important; padding: 32px 24px 80px !important; }
  .plans { grid-template-columns: repeat(3, 1fr) !important; }
  .form-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ═══════════════════════════════════════════════════════════════
   DEVICE-SPECIFIC RULES (set by mmdo-device.js on <html>)
═══════════════════════════════════════════════════════════════ */

/* ── iOS Safari: fix 100vh so bottom bar doesn't cut content ── */
.device-ios body { min-height: calc(var(--vh, 1vh) * 100); }
.device-ios .wrap { padding-bottom: max(80px, env(safe-area-inset-bottom, 80px)) !important; }
.device-ios input, .device-ios select, .device-ios textarea {
  -webkit-appearance: none; border-radius: 10px;
}

/* ── iOS: hide scrollbars on overflow scroll (looks cleaner) ── */
.device-ios ::-webkit-scrollbar { display: none; }

/* ── Android: remove blue tap overlay on buttons/links ── */
.device-android button, .device-android a, .device-android [onclick] {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  outline: none;
}

/* ── Small phones (≤375px screen width) ── */
.phone-small .wrap       { padding: 12px 10px 80px !important; }
.phone-small .plans      { grid-template-columns: 1fr !important; }
.phone-small .form-grid  { grid-template-columns: 1fr !important; }
.phone-small .lbox       { padding: 18px 12px !important; }
.phone-small nav         { padding: 0 10px !important; }
.phone-small .pay-total  { font-size: 24px !important; }
.phone-small .pay-btn    { font-size: 10px !important; letter-spacing: 1px !important; }
.phone-small .sec-badge  { font-size: 8px !important; padding: 4px 6px !important; }
.phone-small .links-grid { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }

/* ── Large phones (>430px: iPhone Plus, Galaxy S Ultra) ── */
.phone-large .plans     { grid-template-columns: 1fr 1fr !important; }
.phone-large .form-grid { grid-template-columns: 1fr 1fr !important; }

/* ── Tablets ── */
.device-tablet .wrap     { max-width: 720px !important; padding: 32px 28px 80px !important; }
.device-tablet .plans    { grid-template-columns: repeat(3, 1fr) !important; }
.device-tablet .form-grid{ grid-template-columns: 1fr 1fr !important; }
.device-tablet .links-grid { grid-template-columns: repeat(3, 1fr) !important; }
.device-tablet nav       { padding: 0 28px !important; }

/* ── Desktop ── */
.device-desktop .plans    { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important; }
.device-desktop #pwa-fab  { display: none !important; }  /* no install button on desktop */

/* ── PWA standalone mode: hide install FAB ── */
.pwa-standalone #pwa-fab    { display: none !important; }
.pwa-standalone #pwa-overlay{ display: none !important; }

/* ── Touch devices: larger tap targets ── */
.device-touch button,
.device-touch .plan-card,
.device-touch .link-card,
.device-touch a[href] { min-height: 44px; }  /* Apple HIG / Material minimum tap target */

/* ── Safari-specific fixes ── */
.browser-safari input[type="date"],
.browser-safari input[type="time"] { -webkit-appearance: none; appearance: none; }

/* ── Android Chrome: fixes input styling ── */
.browser-chrome input, .browser-chrome select {
  background-clip: padding-box;
}

/* ═══════════════════════════════════════════════════════════════
   GAMING CONSOLE & SMART TV STYLES
   Xbox One / Xbox Series X|S · PS4 / PS5 · Nintendo Switch
   All consoles use TV screens viewed from ~10 feet away.
   Rules: bigger text, massive focus rings, no hover, D-pad nav.
═══════════════════════════════════════════════════════════════ */

/* ── CONSOLE BASE: 10-foot UI ── */
.device-console body,
.device-smarttv body {
  font-size: 20px !important;
  line-height: 1.7 !important;
  cursor: none !important; /* no mouse cursor on consoles */
}

.device-console .wrap,
.device-smarttv .wrap {
  max-width: 1400px !important;
  padding: 60px 80px 100px !important;
}

/* ── NAVIGATION ── */
.device-console nav,
.device-smarttv nav {
  height: 80px !important;
  padding: 0 60px !important;
  font-size: 16px !important;
}

/* ── HEADINGS & TITLES ── */
.device-console .pay-total,
.device-smarttv .pay-total {
  font-size: 72px !important;
}
.device-console h1, .device-console h2, .device-console h3,
.device-smarttv  h1, .device-smarttv  h2, .device-smarttv  h3 {
  font-size: clamp(28px, 4vw, 56px) !important;
}

/* ── PLAN CARDS: large and spacious ── */
.device-console .plans,
.device-smarttv  .plans {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 32px !important;
}
.device-console .plan-card,
.device-smarttv  .plan-card {
  padding: 40px 32px !important;
  border-radius: 24px !important;
}
.device-console .plan-price,
.device-smarttv  .plan-price {
  font-size: 48px !important;
}
.device-console .plan-name,
.device-smarttv  .plan-name {
  font-size: 18px !important;
  letter-spacing: 3px !important;
}
.device-console .plan-features li,
.device-smarttv  .plan-features li {
  font-size: 16px !important;
}

/* ── FORM ── */
.device-console .pay-form,
.device-smarttv  .pay-form {
  padding: 48px !important;
  border-radius: 24px !important;
}
.device-console .form-grid,
.device-smarttv  .form-grid {
  grid-template-columns: 1fr 1fr !important;
  gap: 24px !important;
}
.device-console .field label,
.device-smarttv  .field label {
  font-size: 16px !important;
  margin-bottom: 10px !important;
}
.device-console input,
.device-console select,
.device-smarttv  input,
.device-smarttv  select {
  font-size: 20px !important;
  padding: 16px 20px !important;
  border-radius: 12px !important;
}

/* ── PAY BUTTON ── */
.device-console .pay-btn,
.device-smarttv  .pay-btn {
  font-size: 20px !important;
  padding: 24px !important;
  letter-spacing: 6px !important;
  border-radius: 50px !important;
}

/* ══════════════════════════════════════════════
   D-PAD FOCUS STYLES — the most critical part.
   Without a visible focus ring, users cannot
   navigate with a controller or remote.
══════════════════════════════════════════════ */
.device-console *:focus,
.device-smarttv  *:focus {
  outline: 4px solid #e8c87a !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 8px rgba(232, 200, 122, 0.35) !important;
}

/* Plan card selected/focused state on console */
.device-console .plan-card:focus,
.device-console .plan-card.selected,
.device-smarttv  .plan-card:focus,
.device-smarttv  .plan-card.selected {
  outline: 6px solid #e8c87a !important;
  box-shadow: 0 0 0 12px rgba(232, 200, 122, 0.4),
              0 20px 60px rgba(232, 200, 122, 0.2) !important;
  transform: scale(1.04) !important;
}

/* Buttons — extra large focus ring */
.device-console button:focus,
.device-smarttv  button:focus {
  outline: 5px solid #e8c87a !important;
  outline-offset: 6px !important;
  box-shadow: 0 0 0 10px rgba(232, 200, 122, 0.4) !important;
}

/* Links */
.device-console a:focus,
.device-smarttv  a:focus {
  outline: 4px solid #e8c87a !important;
  outline-offset: 3px !important;
  border-radius: 4px !important;
}

/* ── SECURITY BADGES ── */
.device-console .security-badges,
.device-smarttv  .security-badges {
  gap: 20px !important;
}
.device-console .sec-badge,
.device-smarttv  .sec-badge {
  font-size: 16px !important;
  padding: 12px 20px !important;
}

/* ── COOKIE BANNER on TV ── */
.device-console #mmdo-cookie,
.device-smarttv  #mmdo-cookie {
  padding: 24px 60px !important;
  font-size: 18px !important;
}
.device-console .mmdo-cookie-btns button,
.device-smarttv  .mmdo-cookie-btns button {
  font-size: 16px !important;
  padding: 14px 32px !important;
}

/* ── NOTIFICATIONS ── */
.device-console .notif,
.device-smarttv  .notif {
  font-size: 18px !important;
  padding: 20px 28px !important;
  bottom: 60px !important;
  right: 60px !important;
}

/* ── HIDE MOBILE-ONLY ELEMENTS ── */
.device-console #pwa-fab,
.device-smarttv  #pwa-fab {
  display: none !important; /* no PWA install on consoles */
}

/* ── XBOX-SPECIFIC: Edge browser quirks ── */
.device-xbox input, .device-xbox button {
  -ms-high-contrast-adjust: none;
}

/* ── PS5-SPECIFIC (WebKit) ── */
.device-ps5 body, .device-ps4 body {
  -webkit-font-smoothing: antialiased !important;
}
.device-playstation .plan-card {
  /* PS browser doesn't always render border-radius well at scale */
  border-radius: 16px !important;
}

/* ── SWITCH: smaller screen (720p) ── */
.device-switch .wrap {
  max-width: 900px !important;
  padding: 40px 48px !important;
}
.device-switch .plans {
  grid-template-columns: 1fr 1fr !important;
  gap: 20px !important;
}
.device-switch .pay-total { font-size: 48px !important; }
