/* ============================================
   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 (.motion-dbdb) is a descendant of
   .table-selected-1835 (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.current_f00f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".focused_a7a9" 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.logo-complex-789a so it can't cause
   horizontal overflow anyway. */
.title-pink-4d10,
.tooltip-fast-a0ef,
.item-small-f461,
.picture_7eeb,
.center_11e6,
.card-fresh-f0fa,
.wrapper-selected-4b00,
.footer_c723,
.breadcrumb-fac6,
.breadcrumb_860b,
.tag-under-979d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .fresh_2fde {
    padding: 8px 0;
  }
  
  .filter-steel-cb1d img {
    height: 28px;
    width: auto;
  }
  
  .main-warm-f5d3 {
    display: none !important;
  }
  
  .banner_a4b5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .banner_a4b5 svg {
    width: 14px;
    height: 14px;
  }
  
  .modal-cda1 {
    padding: 6px;
  }
  
  .mask-dirty-9343 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .item-small-f461,
  .tooltip-fast-a0ef,
  .picture_7eeb,
  .center_11e6,
  .table_steel_f1d5,
  .background-steel-dfa1,
  .thick-9696,
  .mask_over_d691,
  .first-66da,
  .photo-ef29,
  .breadcrumb-ed69 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .main_e5cc,
  .video-static-4e9a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .huge-d996,
  .accent-narrow-f9a3,
  .right-f37a,
  .block-3e0b,
  .table-short-63a3,
  .down_5857,
  .paragraph_8c63 {
    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 */
  .pagination-full-0880,
  .surface_b74c,
  .slider-82f0,
  .slider_copper_7622,
  .short_0daf {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .disabled_a649,
  .gallery_7f16,
  .table-west-8c29,
  .large_6cce {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .hover_first_1828,
  .table_2c9e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .paragraph-wide-18a8,
  .hover_a27f,
  .active-077a,
  .sort-upper-2956 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .chip-c3c0,
  .table-plasma-d7c4,
  .link_left_f913,
  .panel_230c,
  .backdrop_27a9,
  .dynamic-25f0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pagination-full-0880,
  .surface_b74c,
  .slider_copper_7622 {
    max-width: none !important;
  }
  
  .focused_a7a9 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .disabled_a649 {
    font-size: 1.5rem !important;
  }
  
  .gallery_7f16 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hover_cc76,
  .fast-0fc4 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .table-west-8c29 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .video_d0f5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .progress-33ad {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pagination-full-0880,
  .slider_copper_7622 {
    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: 8325 */
.widget-item-e7 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.3;
}
