/* ============================================
   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 (.hard-76a1) is a descendant of
   .input_solid_f820 (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.tall-a06b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".panel-stale-681a" 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.badge_east_37a8 so it can't cause
   horizontal overflow anyway. */
.link_large_5869,
.mini-5aad,
.component_top_8a19,
.pro-f7c3,
.banner-b8d5,
.pro_8998,
.easy-7271,
.popup-west-9830,
.lite_842c,
.dirty_4ccf,
.picture-6830 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .table-a129 {
    padding: 8px 0;
  }
  
  .section_smooth_9c96 img {
    height: 28px;
    width: auto;
  }
  
  .motion-8378 {
    display: none !important;
  }
  
  .sort-green-fffa {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .sort-green-fffa svg {
    width: 14px;
    height: 14px;
  }
  
  .dirty-5547 {
    padding: 6px;
  }
  
  .soft-5eaf {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .component_top_8a19,
  .mini-5aad,
  .pro-f7c3,
  .banner-b8d5,
  .action_9d80,
  .shade-red-6b30,
  .pressed-80c6,
  .carousel-913e,
  .badge-last-2aa9,
  .backdrop_thick_7984,
  .badge_4eda {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .menu_33fa,
  .aside-dynamic-215f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .photo-lower-8ced,
  .pro-4391,
  .gallery_top_5ec1,
  .slider_0e45,
  .glass-18f2,
  .pattern-middle-ed93,
  .text-cc7a {
    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 */
  .tooltip_b7c1,
  .soft-bab4,
  .summary_edce,
  .filter_glass_d32f,
  .input_center_7480 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .tooltip_5a2d,
  .container-gas-7717,
  .action-d76d,
  .nav-d511 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .hover-6860,
  .banner_090e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .description-a5ce,
  .prev_c6b5,
  .primary-gold-c0b7,
  .silver_30a3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .primary-hard-d577,
  .gallery_advanced_ce2f,
  .carousel-ba79,
  .footer_f706,
  .hot-6058,
  .card_7703 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tooltip_b7c1,
  .soft-bab4,
  .filter_glass_d32f {
    max-width: none !important;
  }
  
  .panel-stale-681a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .tooltip_5a2d {
    font-size: 1.5rem !important;
  }
  
  .container-gas-7717 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .breadcrumb-red-b954,
  .tooltip-focused-4a3d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .action-d76d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .image_a240 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gradient-gas-6587 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tooltip_b7c1,
  .filter_glass_d32f {
    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: 0e87 */
.ghost-box-t1 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.3;
}
