/* ============================================
   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 (.bright-94ce) is a descendant of
   .feature-lite-a386 (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.preview_old_1269 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".title-ebae" 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.bright-c4d1 so it can't cause
   horizontal overflow anyway. */
.notification_3fcc,
.footer-prev-3502,
.mini-4abd,
.dropdown_e18c,
.widget-766f,
.progress_06be,
.gold-28fe,
.texture_0d65,
.upper-04d5,
.status_985c,
.overlay_ca53 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .hover-pressed-8f6d {
    padding: 8px 0;
  }
  
  .texture_8008 img {
    height: 28px;
    width: auto;
  }
  
  .sidebar-slow-d543 {
    display: none !important;
  }
  
  .link-simple-cd69 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .link-simple-cd69 svg {
    width: 14px;
    height: 14px;
  }
  
  .outer_a26a {
    padding: 6px;
  }
  
  .active_5f38 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .mini-4abd,
  .footer-prev-3502,
  .dropdown_e18c,
  .widget-766f,
  .list-9506,
  .section-d53b,
  .pink_2fb0,
  .yellow_f762,
  .over-9e3d,
  .aside-d562,
  .form-00ce,
  .hero_north_fba9 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .detail-out-f4a5,
  .glass-d4c8 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .motion-82ce,
  .out-d8e9,
  .tooltip-bottom-bf0b,
  .bottom_8b55,
  .accordion_fd86,
  .avatar-da02,
  .hero-fluid-7a37 {
    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 */
  .button-large-2007,
  .iron_1047,
  .sort_pressed_9723,
  .table_08ce,
  .alert_3033 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .cool-d1c3,
  .input-523c,
  .fast-9f28,
  .list-0a53 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .first_8855,
  .paragraph-middle-4166 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .smooth-bb20,
  .plasma-328e,
  .hard_1270,
  .slider_a661 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .focus-e493,
  .primary_c560,
  .under_7cc9,
  .box_3879,
  .thumbnail_full_0009,
  .gallery-light-def1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .button-large-2007,
  .iron_1047,
  .table_08ce {
    max-width: none !important;
  }
  
  .title-ebae {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .cool-d1c3 {
    font-size: 1.5rem !important;
  }
  
  .input-523c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .plasma_b190,
  .picture_22a8 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .fast-9f28 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .header_46a2 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .popup_copper_0146 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .button-large-2007,
  .table_08ce {
    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: a77d */
.widget-item-p3 {
  padding: 0.5rem;
  font-size: 11px;
  line-height: 1.3;
}
