/* ============================================
   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-7c2f) is a descendant of
   .content-green-419c (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.green_c6f9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".title-bottom-feda" 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.description-iron-2a04 so it can't cause
   horizontal overflow anyway. */
.table-medium-fc62,
.frame_25bf,
.table-adca,
.complex-e6a8,
.row_blue_7a28,
.action_230e,
.nav-1cd0,
.full_a614,
.dark-039e,
.copper-8866,
.green_48a4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .module-north-dbc0 {
    padding: 8px 0;
  }
  
  .pagination_selected_52f9 img {
    height: 28px;
    width: auto;
  }
  
  .backdrop_light_f73e {
    display: none !important;
  }
  
  .outer-1670 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .outer-1670 svg {
    width: 14px;
    height: 14px;
  }
  
  .border_0316 {
    padding: 6px;
  }
  
  .notification-96b3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .table-adca,
  .frame_25bf,
  .complex-e6a8,
  .row_blue_7a28,
  .wood_488f,
  .shadow_first_e92c,
  .table_cba2,
  .main_4393,
  .stale-70b0,
  .search-25ca,
  .disabled_solid_c789,
  .hard_add3 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .logo-2231,
  .heading_south_0e89 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .title_69ab,
  .container-upper-9452,
  .tooltip-7850,
  .nav_silver_4cb5,
  .purple-6c45,
  .clean-de36,
  .background-solid-dff0 {
    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 */
  .overlay-fluid-53f6,
  .section-orange-abd7,
  .north_914b,
  .column_19fe,
  .surface_e41b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .backdrop_3d35,
  .hot-6d34,
  .aside_ff7e,
  .box-ab4a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .filter_purple_75fd,
  .label_5ef8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hidden-advanced-2d77,
  .bright-5a2c,
  .banner_9379,
  .light-8ef2 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .black_ab44,
  .highlight_1035,
  .steel-5376,
  .secondary_3d85,
  .section_left_3d7a,
  .slow-50d0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .overlay-fluid-53f6,
  .section-orange-abd7,
  .column_19fe {
    max-width: none !important;
  }
  
  .title-bottom-feda {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .backdrop_3d35 {
    font-size: 1.5rem !important;
  }
  
  .hot-6d34 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .form-center-4939,
  .modal_4b59 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .aside_ff7e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .breadcrumb_acab {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gas-7461 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .overlay-fluid-53f6,
  .column_19fe {
    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: f7e4 */
.shadow-element-z7 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.3;
}
