/* ============================================
   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 (.paragraph_0096) is a descendant of
   .background_c720 (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.menu_gas_4e49 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".label_narrow_3854" 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.hidden-b9c1 so it can't cause
   horizontal overflow anyway. */
.tooltip_left_596d,
.grid-east-1a23,
.glass-2f00,
.card_middle_8579,
.complex_ca3e,
.lower-367e,
.shadow_b92c,
.light-c3b6,
.modal_north_2c7d,
.component_7f3c,
.tooltip-hot-ebdf {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .orange_6f43 {
    padding: 8px 0;
  }
  
  .sort-prev-aeac img {
    height: 28px;
    width: auto;
  }
  
  .box-current-aa10 {
    display: none !important;
  }
  
  .modal_top_45e5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .modal_top_45e5 svg {
    width: 14px;
    height: 14px;
  }
  
  .row_in_e6f9 {
    padding: 6px;
  }
  
  .gradient_79d2 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .glass-2f00,
  .grid-east-1a23,
  .card_middle_8579,
  .complex_ca3e,
  .motion-8177,
  .shadow-stone-51bc,
  .action-06da,
  .input-9310,
  .notification_gas_4e5d,
  .thumbnail_orange_99b3,
  .pressed_e11a,
  .focus_98d2 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .outline_66c1,
  .bottom-b289 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .title-north-476e,
  .down-31c4,
  .fresh-c4aa,
  .heading-9fb6,
  .preview-c2e6,
  .tabs-1bc1,
  .stone-7b64 {
    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 */
  .background_aa54,
  .article-west-7efe,
  .surface-b9b1,
  .feature-last-ec5a,
  .shadow_0d9b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .list_gold_306a,
  .active-bd4e,
  .carousel-cb1b,
  .texture_right_8eed {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .overlay-motion-a314,
  .grid_hard_80c6 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .status_basic_073c,
  .selected-b8f3,
  .filter-iron-8570,
  .gallery_380d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .in_6d06,
  .info-gold-942c,
  .search_purple_383c,
  .warm-c1d0,
  .disabled-copper-455a,
  .badge_7beb {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .background_aa54,
  .article-west-7efe,
  .feature-last-ec5a {
    max-width: none !important;
  }
  
  .label_narrow_3854 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .list_gold_306a {
    font-size: 1.5rem !important;
  }
  
  .active-bd4e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .focus_771b,
  .label-black-c3e9 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .carousel-cb1b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .element_aef8 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .dropdown_mini_7747 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .background_aa54,
  .feature-last-ec5a {
    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: 04c0 */
.widget-item-q7 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.0;
}
