/* ============================================
   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 (.detail-3e4b) is a descendant of
   .grid-2cf7 (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.footer-iron-e9a8 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".summary-7f81" 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.text-light-973a so it can't cause
   horizontal overflow anyway. */
.status_a7ca,
.primary_yellow_6ecd,
.alert-down-c0e0,
.component_bronze_d9c6,
.frame-black-0397,
.picture_plasma_f848,
.status-7925,
.outer_1c91,
.notification-cca8,
.menu_red_589b,
.paper_f03b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .lite_72ff {
    padding: 8px 0;
  }
  
  .title_e902 img {
    height: 28px;
    width: auto;
  }
  
  .plasma_6883 {
    display: none !important;
  }
  
  .table-91ce {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .table-91ce svg {
    width: 14px;
    height: 14px;
  }
  
  .filter_2e7c {
    padding: 6px;
  }
  
  .white-2ebb {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .alert-down-c0e0,
  .primary_yellow_6ecd,
  .component_bronze_d9c6,
  .frame-black-0397,
  .caption_6056,
  .wrapper_2f51,
  .image-hot-f502,
  .blue_e882,
  .title-55e5,
  .secondary-under-925e,
  .widget-middle-8567,
  .gold-9ade {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hero-e3bf,
  .simple_9043 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .sort_old_0abb,
  .slow_eee4,
  .narrow-7c52,
  .east-f156,
  .icon_solid_d58d,
  .icon_iron_7525,
  .highlight-3fa8 {
    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 */
  .dropdown_pink_ae84,
  .tertiary_14af,
  .under-adfc,
  .element-3017,
  .container_bottom_8cdc {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hidden_middle_0389,
  .sort-slow-b85a,
  .current_9eb5,
  .layout_ecd0 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .text-simple-e926,
  .hard_bb5f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .component-green-7901,
  .slow_acb3,
  .medium-f333,
  .header_dirty_de12 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .accordion_0b11,
  .yellow_d98c,
  .tooltip_d84c,
  .breadcrumb_wide_5443,
  .hot-4e08,
  .panel_selected_3f9c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dropdown_pink_ae84,
  .tertiary_14af,
  .element-3017 {
    max-width: none !important;
  }
  
  .summary-7f81 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hidden_middle_0389 {
    font-size: 1.5rem !important;
  }
  
  .sort-slow-b85a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .dynamic-8d8c,
  .shade_lite_d1c8 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .current_9eb5 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tall_c829 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .slider_b160 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dropdown_pink_ae84,
  .element-3017 {
    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: 3278 */
.promo-block-p9 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.2;
}
