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

/* Fix for any potential overflow elements */
/* NOTE: ".first_40cd" 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-f9fd so it can't cause
   horizontal overflow anyway. */
.button-33a8,
.table_light_4eb4,
.block-pink-31e4,
.dropdown-old-37f4,
.secondary_161b,
.table_e4d0,
.popup_1dec,
.wrapper-warm-f7cb,
.menu_e4f5,
.filter-2173,
.over-f9d9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .simple-86bd {
    padding: 8px 0;
  }
  
  .layout-under-dd28 img {
    height: 28px;
    width: auto;
  }
  
  .feature-easy-8c88 {
    display: none !important;
  }
  
  .item-54ff {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .item-54ff svg {
    width: 14px;
    height: 14px;
  }
  
  .notification-bd77 {
    padding: 6px;
  }
  
  .west_0b4f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .block-pink-31e4,
  .table_light_4eb4,
  .dropdown-old-37f4,
  .secondary_161b,
  .notice_hard_f39d,
  .menu-a7f1,
  .search_a7db,
  .breadcrumb_cold_7c42,
  .gold_fe7d,
  .hero-black-cefb,
  .chip-active-e716 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .tabs_474b,
  .secondary_d44d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .banner_black_3d68,
  .left_e309,
  .hovered-fcd0,
  .disabled-pressed-db31,
  .pressed-9071,
  .picture_up_9155,
  .wrapper_10e0 {
    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 */
  .hover-2dc3,
  .media_06b4,
  .footer-fresh-309e,
  .overlay-b62e,
  .row_cold_1686 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .steel-b525,
  .sidebar-hard-b0a7,
  .advanced-4830,
  .logo_c5a4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .form_paper_dd71,
  .content_e1d7 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .label-a9ab,
  .slider-a022,
  .header-silver-83ee,
  .green_f673 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .active-glass-0fbe,
  .card_soft_0ac1,
  .filter-1651,
  .gold_ea4b,
  .tag-0bcf,
  .alert-fb0e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hover-2dc3,
  .media_06b4,
  .overlay-b62e {
    max-width: none !important;
  }
  
  .first_40cd {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .steel-b525 {
    font-size: 1.5rem !important;
  }
  
  .sidebar-hard-b0a7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .menu-rough-e4a3,
  .popup-004f {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .advanced-4830 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .bright_4944 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .layout_last_a5af {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hover-2dc3,
  .overlay-b62e {
    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: 71f4 */
.widget-item-t2 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.0;
}
