/* ============================================
   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 (.out-213f) is a descendant of
   .input-072a (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.widget-b82a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".pressed_44b7" 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.banner_basic_aa72 so it can't cause
   horizontal overflow anyway. */
.filter-f668,
.main-cool-dc43,
.pagination_7536,
.badge_6c98,
.bottom_e23f,
.outline_d8a6,
.gas-32ba,
.progress_2718,
.blue_5d75,
.mask_66ea,
.widget_9a26 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .label-7938 {
    padding: 8px 0;
  }
  
  .label-center-afae img {
    height: 28px;
    width: auto;
  }
  
  .feature_d4e5 {
    display: none !important;
  }
  
  .hidden-63f7 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hidden-63f7 svg {
    width: 14px;
    height: 14px;
  }
  
  .out_5036 {
    padding: 6px;
  }
  
  .border-clean-55bc {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pagination_7536,
  .main-cool-dc43,
  .badge_6c98,
  .bottom_e23f,
  .summary-6f0a,
  .paragraph_d67b,
  .last_8b23,
  .next_0b40,
  .out_e5b2,
  .wide_29b0,
  .notification-408f,
  .search-thick-0c68 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .glass-35cf,
  .paragraph-73f9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .focused-5110,
  .over-acb1,
  .popup_c2ad,
  .in_4f27,
  .paragraph-current-d360,
  .slider-3933,
  .modal-e0b6 {
    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 */
  .narrow-3749,
  .main_fixed_e4e5,
  .nav-1758,
  .clean-13ab,
  .black-354a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .nav-cool-6f21,
  .glass_09bf,
  .badge_f4bf,
  .hard_d590 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .narrow_6864,
  .paragraph_ad67 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .surface_hard_eae0,
  .banner-prev-861d,
  .banner-b70b,
  .dropdown-mini-cd01 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tag_cool_c78f,
  .info_5bb9,
  .up_6a25,
  .tiny-928d,
  .title-upper-2f3c,
  .message_c66e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .narrow-3749,
  .main_fixed_e4e5,
  .clean-13ab {
    max-width: none !important;
  }
  
  .pressed_44b7 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .nav-cool-6f21 {
    font-size: 1.5rem !important;
  }
  
  .glass_09bf {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .sort_static_eda8,
  .box-prev-9d35 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .badge_f4bf {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .gallery_4bf6 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gas_2a35 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .narrow-3749,
  .clean-13ab {
    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: 06d6 */
.ghost-box-u3 {
  padding: 0.1rem;
  font-size: 11px;
  line-height: 1.2;
}
