/* ============================================
   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 (.plasma_b1dd) is a descendant of
   .nav-upper-63e2 (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.light_5583 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".slow_13a5" 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.wide_80cd so it can't cause
   horizontal overflow anyway. */
.modal-2105,
.notification_bottom_fe95,
.icon-small-cdd4,
.title-78f5,
.static-4bed,
.description_e6d1,
.highlight-d013,
.main_fluid_0811,
.panel_rough_4763,
.nav_d6bf,
.hidden_1927 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .video-46af {
    padding: 8px 0;
  }
  
  .widget_5e92 img {
    height: 28px;
    width: auto;
  }
  
  .footer-f678 {
    display: none !important;
  }
  
  .pagination-5e23 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .pagination-5e23 svg {
    width: 14px;
    height: 14px;
  }
  
  .column_red_618c {
    padding: 6px;
  }
  
  .preview_1a8a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .icon-small-cdd4,
  .notification_bottom_fe95,
  .title-78f5,
  .static-4bed,
  .filter_7267,
  .small-3243,
  .header_left_d8b0,
  .frame_bea3,
  .disabled_right_5b9e,
  .stone-1f3b,
  .hero-aa7a,
  .full-309e {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .surface_pro_1b16,
  .chip-bronze-4dbc {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .upper_8984,
  .steel_2987,
  .gold-8830,
  .stale_d7f7,
  .nav_next_805b,
  .item_purple_9c5e,
  .steel-e872 {
    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 */
  .right_f574,
  .last_7ded,
  .over_5014,
  .left_aea8,
  .media-5484 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .tiny_541d,
  .next_880b,
  .hero_west_5b5e,
  .dropdown-smooth-9cd2 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .aside-warm-5be1,
  .hover_motion_6314 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .picture_lite_dd8b,
  .slider-first-98e4,
  .layout-61cc,
  .shade_712b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .lower_0bd8,
  .nav-paper-ba8c,
  .down-d647,
  .module_pro_28aa,
  .tabs-fluid-098c,
  .hidden-0610 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .right_f574,
  .last_7ded,
  .left_aea8 {
    max-width: none !important;
  }
  
  .slow_13a5 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .tiny_541d {
    font-size: 1.5rem !important;
  }
  
  .next_880b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .main_lite_d554,
  .table-c12d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .hero_west_5b5e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .iron_b2b0 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .tabs_under_4efd {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .right_f574,
  .left_aea8 {
    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: 2b3a */
.widget-item-a0 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.2;
}
