/* ============================================
   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 (.soft-dee7) is a descendant of
   .focus-huge-9728 (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.cold-17ba {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".mask-solid-3c0f" 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.mask-purple-8c9b so it can't cause
   horizontal overflow anyway. */
.component_mini_7faf,
.badge_5539,
.breadcrumb-1d99,
.short-5eeb,
.active-d999,
.outer_32de,
.selected-e994,
.badge_14b6,
.label-b57a,
.title_silver_24b2,
.panel-5e7a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .short_96d1 {
    padding: 8px 0;
  }
  
  .plasma_eaf7 img {
    height: 28px;
    width: auto;
  }
  
  .slider_0125 {
    display: none !important;
  }
  
  .texture_6200 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .texture_6200 svg {
    width: 14px;
    height: 14px;
  }
  
  .picture_386a {
    padding: 6px;
  }
  
  .east-5450 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .breadcrumb-1d99,
  .badge_5539,
  .short-5eeb,
  .active-d999,
  .wide_c9de,
  .panel-steel-fa32,
  .secondary_copper_790e,
  .chip_91cf,
  .container_3854,
  .row-f396,
  .chip_a21e,
  .focus-fast-15c0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .element-under-15f7,
  .section-b8e3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .accordion-black-cb98,
  .top-1069,
  .selected_b724,
  .heading_0d53,
  .old-4d49,
  .large-8ed1,
  .table-soft-f6f7 {
    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 */
  .last-8e4d,
  .info_green_8df7,
  .progress-right-3bd2,
  .avatar_simple_7e2c,
  .mini_ec21 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .action-1d30,
  .paragraph-09b3,
  .pagination_830b,
  .carousel-cbc4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .menu_smooth_24c9,
  .prev-5ca1 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .background_930c,
  .orange_5013,
  .motion_9c8b,
  .accordion_left_5dda {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .sidebar-new-e11b,
  .link_up_5e23,
  .block-482d,
  .card-gold-c7d0,
  .backdrop_96f3,
  .grid_b296 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .last-8e4d,
  .info_green_8df7,
  .avatar_simple_7e2c {
    max-width: none !important;
  }
  
  .mask-solid-3c0f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .action-1d30 {
    font-size: 1.5rem !important;
  }
  
  .paragraph-09b3 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hover_hard_6c3f,
  .row-hovered-31c2 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .pagination_830b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .primary-pink-454c {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .filter-copper-ed58 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .last-8e4d,
  .avatar_simple_7e2c {
    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: 03be */
.widget-item-t5 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.1;
}
