/* ============================================
   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 (.frame_e3fd) is a descendant of
   .tooltip-new-59f5 (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.pro-d157 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".status_aad0" 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.slow_3836 so it can't cause
   horizontal overflow anyway. */
.tall-192c,
.content_ff25,
.box-c434,
.popup-000a,
.pressed_e6ba,
.accent-bright-c259,
.brown_7285,
.button-ae06,
.lite_2c29,
.thumbnail-6607,
.modal-fast-fe2b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .block-c188 {
    padding: 8px 0;
  }
  
  .search-b507 img {
    height: 28px;
    width: auto;
  }
  
  .secondary-ad36 {
    display: none !important;
  }
  
  .alert_3909 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .alert_3909 svg {
    width: 14px;
    height: 14px;
  }
  
  .pink_1d55 {
    padding: 6px;
  }
  
  .filter_9ad8 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .box-c434,
  .content_ff25,
  .popup-000a,
  .pressed_e6ba,
  .inner-4146,
  .solid-4421,
  .heading_e5d1,
  .input_37ec,
  .cold-eb3a,
  .media_first_a375,
  .layout_6c65,
  .hidden_beaf {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .accordion_right_6580,
  .dropdown_ac46 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .focus-warm-7f92,
  .pink-35ca,
  .footer-cb1c,
  .dim-16b9,
  .filter_advanced_8129,
  .aside-bright-cf6f,
  .hero_a7e2 {
    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 */
  .tooltip_6ad2,
  .background-light-1ff7,
  .header-east-384a,
  .outer-73c8,
  .component_2418 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .module_fresh_f18c,
  .narrow-7c06,
  .filter_wide_a70f,
  .surface-9af8 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .table_a0a4,
  .black_b895 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .footer-b272,
  .wrapper-166c,
  .highlight_5a6a,
  .disabled-67bc {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .glass-9484,
  .picture-80e2,
  .button-short-fd6d,
  .action-070a,
  .primary_8ef5,
  .surface_1fec {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tooltip_6ad2,
  .background-light-1ff7,
  .outer-73c8 {
    max-width: none !important;
  }
  
  .status_aad0 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .module_fresh_f18c {
    font-size: 1.5rem !important;
  }
  
  .narrow-7c06 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .detail_a104,
  .inner-d424 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .filter_wide_a70f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .new-a50e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .preview_red_f618 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tooltip_6ad2,
  .outer-73c8 {
    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: 8573 */
.ghost-box-l0 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.0;
}
