/* ============================================
   CRITICAL MOBILE FIXES
   Additional layer to ensure perfect mobile display
   ============================================ */

/* Prevent horizontal scroll at all costs */
html {
  width: 100%;
  scroll-behavior: smooth;
  /* NO position:relative - it breaks sticky! */
  /* NO overflow-x here either - mixed with body's overflow-x: hidden
     it makes <html> its own scroll container and breaks sticky too! */
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* NO position:relative - it breaks sticky! */
}

/* Ensure all major containers respect viewport */
/* NOTE: "nav" is intentionally excluded here. Giving a <nav> element
   overflow-x: hidden makes its overflow-y auto-compute to "auto" (per the
   CSS overflow spec), turning it into a clipping/scroll container. Since
   the header's dropdown submenu (.in-240e) is a descendant of
   .orange-3c90 (a <nav>), it was getting clipped and forced into a tiny
   internal scrollbar instead of opening naturally below the nav link. */
main,
section,
article,
footer {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header must NOT have max-width restriction for sticky to work */
header.liquid_7ba8 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dropdown_b19a" is intentionally excluded here for the same reason as
   "nav" above — the header's <div class="container"> wraps the nav and
   must not clip the dropdown submenu with an auto-computed overflow-y.
   It's already width-capped via max-width in style.component-copper-4e99 so it can't cause
   horizontal overflow anyway. */
.mini_5545,
.link_0055,
.pressed_a96c,
.slider_bottom_61ff,
.feature-16c8,
.accordion-advanced-bd96,
.breadcrumb_8268,
.bottom-1459,
.message_large_c8cc,
.notice-iron-6019,
.section_0153 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pagination_bottom_b1f6 {
    padding: 8px 0;
  }
  
  .motion_867d img {
    height: 28px;
    width: auto;
  }
  
  .column-pressed-a60f {
    display: none !important;
  }
  
  .column_32c4 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .column_32c4 svg {
    width: 14px;
    height: 14px;
  }
  
  .border-1707 {
    padding: 6px;
  }
  
  .grid_2746 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pressed_a96c,
  .link_0055,
  .slider_bottom_61ff,
  .feature-16c8,
  .overlay_a30e,
  .message-soft-c58d,
  .column-44cf,
  .box_silver_6652,
  .image_aaa5,
  .fresh_d610,
  .accordion_active_ad94,
  .column-new-d5e1 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .badge_2e12,
  .notification-gold-71b9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .gradient_f991,
  .image-advanced-4588,
  .upper_3a39,
  .outer_8854,
  .shadow_copper_6cb6,
  .over-5348,
  .hidden-first-ac04 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Ensure images are responsive */
  img,
  svg,
  picture {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Better padding for mobile */
  .iron-8b6f,
  .popup-1809,
  .gold_8959,
  .link-2424,
  .module-f53b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .in_7d14,
  .out_7eff,
  .slider-376e,
  .pagination_new_19c5 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .huge-69d9,
  .active_copper_5b60 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .tag-copper-2bcc,
  .widget_35d5,
  .notice_dark_1dc4,
  .thick-7de3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .backdrop-a48c,
  .next-79cc,
  .paper_eabd,
  .block-steel-996d,
  .active-cb3d,
  .paper-ef0e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .iron-8b6f,
  .popup-1809,
  .link-2424 {
    max-width: none !important;
  }
  
  .dropdown_b19a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .in_7d14 {
    font-size: 1.5rem !important;
  }
  
  .out_7eff {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .info_top_4b73,
  .layout-current-247d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .slider-376e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .detail_4f25 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .focus-33a0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .iron-8b6f,
  .link-2424 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* iPhone X and notch devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* css-noise: 8339 */
.phantom-card-y7 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.0;
}
