/* ============================================
   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 (.disabled-c8f1) is a descendant of
   .west-66dd (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.status-fd38 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".shadow-light-7e1b" 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.green_7836 so it can't cause
   horizontal overflow anyway. */
.preview_dim_a480,
.message_pressed_1360,
.footer-4e51,
.notice-basic-a3fc,
.box-active-0831,
.dynamic_fa05,
.icon_active_43c9,
.footer-1463,
.pattern_b4d5,
.info-copper-cd26,
.pink_932b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .thick-c2b3 {
    padding: 8px 0;
  }
  
  .status_blue_d538 img {
    height: 28px;
    width: auto;
  }
  
  .status_wide_e5d9 {
    display: none !important;
  }
  
  .chip-8602 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .chip-8602 svg {
    width: 14px;
    height: 14px;
  }
  
  .badge_2e28 {
    padding: 6px;
  }
  
  .accordion-19d1 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .footer-4e51,
  .message_pressed_1360,
  .notice-basic-a3fc,
  .box-active-0831,
  .liquid_4992,
  .border-fb92,
  .glass_73b4,
  .primary-hard-b2e0,
  .message_dim_b4de,
  .wrapper_1f2f,
  .wrapper_out_6e57,
  .south_1d0e {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .advanced_b442,
  .pattern_iron_b7eb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tiny_add8,
  .column_thick_1e21,
  .list_middle_4e02,
  .upper_9c7f,
  .dropdown_dd45,
  .logo-glass-185f,
  .component_a0dd {
    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 */
  .notification_purple_2116,
  .block_fast_6a83,
  .icon_hard_5221,
  .filter-fb17,
  .outline_pressed_48b2 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .preview_c918,
  .component-66dd,
  .gallery-orange-27d8,
  .dark-0d47 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .medium_c596,
  .hot-2a49 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hovered_edfe,
  .layout_9595,
  .card-09d1,
  .notice_db37 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .narrow_1af2,
  .popup_ce50,
  .filter_6017,
  .outer_bd27,
  .element_north_e0f3,
  .image-e21a {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .notification_purple_2116,
  .block_fast_6a83,
  .filter-fb17 {
    max-width: none !important;
  }
  
  .shadow-light-7e1b {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .preview_c918 {
    font-size: 1.5rem !important;
  }
  
  .component-66dd {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .content-1a94,
  .chip_brown_f72d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .gallery-orange-27d8 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .orange_7109 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pink-7010 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .notification_purple_2116,
  .filter-fb17 {
    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: 9e62 */
.promo-block-v2 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.2;
}
