/* ============================================
   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 (.over_4397) is a descendant of
   .large-c5d6 (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.lite-badc {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".accordion-silver-1d63" 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.progress_1c72 so it can't cause
   horizontal overflow anyway. */
.module-active-b7b9,
.status_light_0a3d,
.disabled-7f56,
.hover_f022,
.title_e633,
.active-1dff,
.solid_4771,
.info_gas_e92a,
.header-362b,
.detail-68f6,
.title_cool_2498 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .focus_copper_cb2c {
    padding: 8px 0;
  }
  
  .caption_left_d89c img {
    height: 28px;
    width: auto;
  }
  
  .red_315f {
    display: none !important;
  }
  
  .small-3f8f {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .small-3f8f svg {
    width: 14px;
    height: 14px;
  }
  
  .progress_9c8b {
    padding: 6px;
  }
  
  .gradient_5e50 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .disabled-7f56,
  .status_light_0a3d,
  .hover_f022,
  .title_e633,
  .wrapper_first_8362,
  .header-in-aa66,
  .widget-copper-78fc,
  .up_2522,
  .column_1d94,
  .texture-middle-c59d,
  .modal_322b {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .copper_ad12,
  .header-new-c8e3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .active_9e7b,
  .mask-5478,
  .tag-cdc5,
  .white-61fc,
  .icon-easy-beff,
  .accent_65d6,
  .item_9c11 {
    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 */
  .pro_1501,
  .pro-5d84,
  .advanced-edfb,
  .focus-1177,
  .chip_left_47eb {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hidden_bb4e,
  .basic-b386,
  .hot-135b,
  .liquid-952a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .panel-7157,
  .narrow-730b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .button-green-510e,
  .wide_8861,
  .large-e1da,
  .outer_45c9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .title_0c45,
  .message_dim_169d,
  .filter-first-6cd1,
  .center_9a2b,
  .section-out-a62b,
  .wood_c734 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pro_1501,
  .pro-5d84,
  .focus-1177 {
    max-width: none !important;
  }
  
  .accordion-silver-1d63 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hidden_bb4e {
    font-size: 1.5rem !important;
  }
  
  .basic-b386 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .text-fixed-d12d,
  .wide_d376 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .hot-135b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .column-7f26 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .narrow-9056 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pro_1501,
  .focus-1177 {
    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: a832 */
.phantom-card-d0 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.3;
}
