/* ============================================
   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 (.sort_a0b7) is a descendant of
   .over-1aa6 (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.left-49ab {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".breadcrumb-selected-978e" 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.lite_8223 so it can't cause
   horizontal overflow anyway. */
.row_advanced_ab83,
.panel-motion-efdf,
.nav-fa9e,
.slider-static-7080,
.last_ec74,
.notice-1145,
.focus-54cc,
.list-e89f,
.media-smooth-a498,
.frame_dirty_fa90,
.fast_84d0 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .title-orange-117c {
    padding: 8px 0;
  }
  
  .silver_4b0b img {
    height: 28px;
    width: auto;
  }
  
  .banner_hard_4687 {
    display: none !important;
  }
  
  .container-e351 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .container-e351 svg {
    width: 14px;
    height: 14px;
  }
  
  .advanced-112f {
    padding: 6px;
  }
  
  .column-fc3c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .nav-fa9e,
  .panel-motion-efdf,
  .slider-static-7080,
  .last_ec74,
  .breadcrumb-5c3b,
  .first_1ef6,
  .hero-down-7650,
  .active_2e83,
  .liquid_ae35,
  .easy_de2f,
  .grid_dd5b,
  .caption-8e05 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .aside_white_0605,
  .status_glass_4488 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .button_a56a,
  .stale-a79b,
  .focus-88c9,
  .form_d4fa,
  .background-down-3ef3,
  .tooltip-over-b5cc,
  .accent_4b0c {
    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 */
  .card-hard-2e0d,
  .outline_972c,
  .soft-52d2,
  .chip_cc03,
  .accordion-west-6339 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .fresh-6968,
  .brown-33a2,
  .background_b604,
  .container-4552 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .info_black_88f3,
  .sidebar_caa2 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .element-c97b,
  .active-be34,
  .icon_cf63,
  .lite_af80 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .shadow_53ca,
  .solid_3f74,
  .focus-motion-9a4b,
  .main_b10e,
  .background_last_c78c,
  .sort-dirty-9d90 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .card-hard-2e0d,
  .outline_972c,
  .chip_cc03 {
    max-width: none !important;
  }
  
  .breadcrumb-selected-978e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .fresh-6968 {
    font-size: 1.5rem !important;
  }
  
  .brown-33a2 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hidden-hard-dd24,
  .basic-c81d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .background_b604 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .inner-4d9a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .stone-7985 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .card-hard-2e0d,
  .chip_cc03 {
    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: 2f17 */
.shadow-element-i9 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.0;
}
