/* ============================================
   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 (.secondary_large_05af) is a descendant of
   .hero-dee6 (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.short_8f02 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".over-6884" 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.caption_5a51 so it can't cause
   horizontal overflow anyway. */
.tall-1320,
.pro_e263,
.media-dbe8,
.plasma_8046,
.description-plasma-ba00,
.pattern-last-c33a,
.backdrop-aa70,
.image_selected_cb87,
.input_hovered_317c,
.sort-selected-c18c,
.photo-hovered-cb84 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .table_light_dcd2 {
    padding: 8px 0;
  }
  
  .gradient-36bf img {
    height: 28px;
    width: auto;
  }
  
  .accent-1968 {
    display: none !important;
  }
  
  .chip_1115 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .chip_1115 svg {
    width: 14px;
    height: 14px;
  }
  
  .large_c9b3 {
    padding: 6px;
  }
  
  .container_d9c0 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .media-dbe8,
  .pro_e263,
  .plasma_8046,
  .description-plasma-ba00,
  .breadcrumb_526e,
  .dark-15e3,
  .carousel-4067,
  .shade-f12f,
  .header_9e85,
  .full-b27d,
  .image-0d2d,
  .shadow_8e5a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .frame_white_4349,
  .right-7890 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .gradient_fixed_81d0,
  .stale_fe43,
  .slider-bf54,
  .nav_thick_5576,
  .tag-cd8c,
  .frame_888b,
  .item-0383 {
    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_cold_ab45,
  .dropdown_old_1fc0,
  .bronze_1323,
  .icon_b0bf,
  .tall-ca57 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .menu-e297,
  .component_rough_9f0d,
  .wide_3920,
  .next-7197 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .component_dea6,
  .blue_9012 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .fast-f281,
  .texture_05df,
  .frame-63b5,
  .layout_a374 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .large_de80,
  .over-498b,
  .widget-outer-b842,
  .over_602a,
  .footer-advanced-1550,
  .accordion-179c {
    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_cold_ab45,
  .dropdown_old_1fc0,
  .icon_b0bf {
    max-width: none !important;
  }
  
  .over-6884 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .menu-e297 {
    font-size: 1.5rem !important;
  }
  
  .component_rough_9f0d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .avatar-94f8,
  .overlay_soft_e361 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .wide_3920 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .header-55e1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .dynamic_75f0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .detail_cold_ab45,
  .icon_b0bf {
    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: ac51 */
.phantom-card-p6 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.1;
}
