/* ============================================
   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 (.brown_7df3) is a descendant of
   .pink-032c (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.background-527e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".prev-9c39" 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.badge_wood_00f5 so it can't cause
   horizontal overflow anyway. */
.shade_dark_6fab,
.popup_focused_256c,
.wrapper_solid_2a96,
.grid_dabb,
.fixed-5fe6,
.rough_f145,
.list-cool-cc10,
.fresh-a3c2,
.search-tiny-a856,
.dropdown-green-8a2e,
.badge_steel_8a48 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .tall-7651 {
    padding: 8px 0;
  }
  
  .highlight_hot_3f9f img {
    height: 28px;
    width: auto;
  }
  
  .breadcrumb-short-0ef7 {
    display: none !important;
  }
  
  .tertiary-huge-86d2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tertiary-huge-86d2 svg {
    width: 14px;
    height: 14px;
  }
  
  .inner-90ad {
    padding: 6px;
  }
  
  .card_bottom_402b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .wrapper_solid_2a96,
  .popup_focused_256c,
  .grid_dabb,
  .fixed-5fe6,
  .over_167d,
  .shadow_large_b9c3,
  .disabled-top-0c9e,
  .item_43d0,
  .icon_3d58,
  .tertiary_fdcb,
  .focus_over_0757,
  .video_out_9619 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .text_2aec,
  .outer_2174 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .wrapper_lower_a4f4,
  .tooltip-738f,
  .hot_6d6d,
  .search_large_dd18,
  .nav_f7f3,
  .media_c671,
  .upper-6c9e {
    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 */
  .thumbnail_bottom_8841,
  .message-paper-7d53,
  .shade_liquid_0d24,
  .notice-becc,
  .info_copper_4137 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hot-0036,
  .item-pro-d37e,
  .filter-medium-0b49,
  .active-5350 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .breadcrumb-dfd1,
  .filter_cedd {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .item-9cdb,
  .backdrop_8d52,
  .status-fast-a801,
  .chip_2054 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .current_f663,
  .shade-action-57ca,
  .under_a752,
  .north_dad9,
  .menu-60bb,
  .accordion-bcbe {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .thumbnail_bottom_8841,
  .message-paper-7d53,
  .notice-becc {
    max-width: none !important;
  }
  
  .prev-9c39 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hot-0036 {
    font-size: 1.5rem !important;
  }
  
  .item-pro-d37e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .tiny-6aed,
  .banner-2b28 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .filter-medium-0b49 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .header-0478 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .item-center-f5f3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .thumbnail_bottom_8841,
  .notice-becc {
    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: f3cc */
.widget-item-q4 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.2;
}
