/* ============================================
   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 (.tooltip-5c5c) is a descendant of
   .caption-glass-8d29 (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.active_next_1e8b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".primary-last-5a5e" 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.paper_a9b9 so it can't cause
   horizontal overflow anyway. */
.hot_9f12,
.first_954c,
.texture_solid_167a,
.iron-fc65,
.narrow-69d9,
.simple_02ca,
.hover-clean-13ea,
.preview_edc6,
.search_0a1a,
.list-bronze-bc38,
.column_plasma_fa58 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .block-large-bb0b {
    padding: 8px 0;
  }
  
  .label_fast_c1ce img {
    height: 28px;
    width: auto;
  }
  
  .status-red-712a {
    display: none !important;
  }
  
  .wide-d4c4 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .wide-d4c4 svg {
    width: 14px;
    height: 14px;
  }
  
  .notice-current-e4cd {
    padding: 6px;
  }
  
  .title-2fad {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .texture_solid_167a,
  .first_954c,
  .iron-fc65,
  .narrow-69d9,
  .short_5395,
  .panel_bronze_67e8,
  .box-top-cf92,
  .feature_04b5,
  .outline_4dc4,
  .title_68d0,
  .full_2ba3,
  .over_e168 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .tooltip_9c9a,
  .action-5cf8 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .right_faa8,
  .texture_simple_2e73,
  .footer_hot_649d,
  .panel-14b9,
  .focus-inner-1a22,
  .header_bbee,
  .disabled_c4a7 {
    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 */
  .grid_center_287d,
  .chip_66c7,
  .shade_soft_c1d5,
  .wrapper-tiny-635e,
  .hovered-3d0b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .filter_1008,
  .dropdown-inner-9691,
  .box_c40f,
  .border_7a32 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .orange_caef,
  .thick-b4a3 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .outline-abcb,
  .sort-up-acee,
  .cold-c671,
  .nav_d9fb {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .main-394a,
  .hidden_8047,
  .grid_top_5236,
  .image-e938,
  .middle_a835,
  .widget_silver_73d7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .grid_center_287d,
  .chip_66c7,
  .wrapper-tiny-635e {
    max-width: none !important;
  }
  
  .primary-last-5a5e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .filter_1008 {
    font-size: 1.5rem !important;
  }
  
  .dropdown-inner-9691 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .mask_5cd6,
  .gradient_clean_c243 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .box_c40f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .down_4942 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .feature-advanced-2731 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .grid_center_287d,
  .wrapper-tiny-635e {
    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: b692 */
.shadow-element-u8 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.1;
}
