/* ============================================
   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 (.widget_hard_1a40) is a descendant of
   .banner-black-00a0 (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.alert_c1e9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hidden-7da7" 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.primary_08ab so it can't cause
   horizontal overflow anyway. */
.green_825e,
.header-d536,
.soft-edcc,
.hero_94ef,
.notice-simple-3619,
.search-d873,
.focus_center_b385,
.video_west_7550,
.feature-wide-dfca,
.hero-8944,
.popup_cold_c35e {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .component_d53d {
    padding: 8px 0;
  }
  
  .popup_e8da img {
    height: 28px;
    width: auto;
  }
  
  .fixed_b5e2 {
    display: none !important;
  }
  
  .active_c1c6 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .active_c1c6 svg {
    width: 14px;
    height: 14px;
  }
  
  .caption-red-b165 {
    padding: 6px;
  }
  
  .outline_active_2943 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .soft-edcc,
  .header-d536,
  .hero_94ef,
  .notice-simple-3619,
  .nav_current_1071,
  .widget_inner_6b14,
  .left-64fe,
  .border_simple_b214,
  .wrapper_cc75,
  .popup-dynamic-a891,
  .footer-short-6134 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .text_bottom_defc,
  .solid_d834 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .active_hot_513b,
  .in_10aa,
  .background_8a94,
  .primary-paper-0ac5,
  .accent_b422,
  .old_b504,
  .content_617b {
    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 */
  .mask-cb8b,
  .summary-active-c467,
  .icon-new-8943,
  .tooltip-0d6e,
  .element_selected_cd30 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .shade-active-fc06,
  .pro-4c1c,
  .title-brown-e58a,
  .item-hot-3a54 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .gas_ad80,
  .hover-pressed-67fb {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .liquid-b921,
  .banner_east_0ac2,
  .mask_a4af,
  .bottom_e5a3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .dynamic-b8b1,
  .info_plasma_43f6,
  .photo_39b9,
  .sort-77e1,
  .tertiary-e5b3,
  .section-7674 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .mask-cb8b,
  .summary-active-c467,
  .tooltip-0d6e {
    max-width: none !important;
  }
  
  .hidden-7da7 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .shade-active-fc06 {
    font-size: 1.5rem !important;
  }
  
  .pro-4c1c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .block_5ff7,
  .large_c72b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .title-brown-e58a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .title-7673 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .background_4ec2 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .mask-cb8b,
  .tooltip-0d6e {
    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: d9fc */
.ghost-box-b9 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.0;
}
