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

/* Fix for any potential overflow elements */
/* NOTE: ".content-a57c" 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.banner_65af so it can't cause
   horizontal overflow anyway. */
.orange-d43d,
.component_current_c9af,
.short-712d,
.info_dark_9bf2,
.narrow-6366,
.picture_black_3529,
.button_4d74,
.left-c4db,
.tiny-aef5,
.bronze_a9a5,
.hover_silver_590e {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .smooth-0ba7 {
    padding: 8px 0;
  }
  
  .black-78cc img {
    height: 28px;
    width: auto;
  }
  
  .texture-simple-3163 {
    display: none !important;
  }
  
  .footer-complex-7f96 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .footer-complex-7f96 svg {
    width: 14px;
    height: 14px;
  }
  
  .hover-gas-86ba {
    padding: 6px;
  }
  
  .tertiary-89b0 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .short-712d,
  .component_current_c9af,
  .info_dark_9bf2,
  .narrow-6366,
  .large-de59,
  .selected_d388,
  .focus_yellow_abc8,
  .gold-b415,
  .label_7289,
  .dark-6e22,
  .sort_1f56,
  .primary-13a7 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .glass-c9fe,
  .glass_3472 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .filter_green_5aea,
  .tooltip-7fcb,
  .solid-0820,
  .card_9c9c,
  .grid-b589,
  .wrapper-dae0,
  .logo-e305 {
    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 */
  .detail-109d,
  .cold_56f6,
  .small-4e0a,
  .tall-e3c7,
  .overlay-easy-bba2 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .photo-fb00,
  .shade_action_46e3,
  .left_3e0e,
  .gallery_4c52 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .aside-short-7768,
  .down_298c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .filter-west-79b4,
  .hot_a584,
  .blue_64ad,
  .fixed_a77d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .pagination_ef26,
  .stone_7864,
  .outer_3505,
  .list_easy_8536,
  .photo_complex_d27f,
  .summary-85e5 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .detail-109d,
  .cold_56f6,
  .tall-e3c7 {
    max-width: none !important;
  }
  
  .content-a57c {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .photo-fb00 {
    font-size: 1.5rem !important;
  }
  
  .shade_action_46e3 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .component-648b,
  .banner-ee75 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .left_3e0e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .prev_6305 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .outer-7df7 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .detail-109d,
  .tall-e3c7 {
    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: 22a7 */
.promo-block-j6 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.1;
}
