/* ============================================
   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 (.widget-169a) is a descendant of
   .left_5a01 (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.modal_huge_bc90 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dim_d55b" 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.avatar_b444 so it can't cause
   horizontal overflow anyway. */
.shade-9e7c,
.in_54a4,
.soft-79c4,
.table_cold_049a,
.full-7a8e,
.element_soft_4cdd,
.button-thick-fac8,
.background-under-3e6f,
.card_under_5fbb,
.gallery-green-0fb8,
.notification_complex_ebab {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .tooltip_rough_723d {
    padding: 8px 0;
  }
  
  .card-full-e313 img {
    height: 28px;
    width: auto;
  }
  
  .accordion-gold-018f {
    display: none !important;
  }
  
  .info-4424 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .info-4424 svg {
    width: 14px;
    height: 14px;
  }
  
  .filter_a6a9 {
    padding: 6px;
  }
  
  .search_faaf {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .soft-79c4,
  .in_54a4,
  .table_cold_049a,
  .full-7a8e,
  .button-selected-508c,
  .mask-top-0604,
  .carousel-524d,
  .block_full_2d75,
  .panel-3d70,
  .brown-6dc4,
  .column_clean_5ae4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .secondary_5640,
  .media-fluid-fa57 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tertiary-ebe4,
  .notice-f66c,
  .medium-298a,
  .overlay_fixed_f7e3,
  .message-6af0,
  .card_white_e28c,
  .tag-c5e5 {
    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 */
  .clean_e0f4,
  .mini_9b09,
  .block-3814,
  .search-cb3c,
  .container-68c6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .outer_efce,
  .component_fresh_55f2,
  .lite_6ed4,
  .pattern-complex-89c4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .under-b3fc,
  .active_huge_149b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .disabled-bronze-bc1c,
  .image_d359,
  .carousel_steel_02a7,
  .chip-solid-5ba9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tabs_focused_b5c3,
  .focus_e484,
  .steel_8097,
  .main-9f40,
  .avatar_5409,
  .highlight-0e45 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .clean_e0f4,
  .mini_9b09,
  .search-cb3c {
    max-width: none !important;
  }
  
  .dim_d55b {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .outer_efce {
    font-size: 1.5rem !important;
  }
  
  .component_fresh_55f2 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .list_pink_f056,
  .frame-a1aa {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .lite_6ed4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .hero-2c0a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .message-static-b2b3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .clean_e0f4,
  .search-cb3c {
    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: d325 */
.widget-item-y2 {
  padding: 0.5rem;
  font-size: 11px;
  line-height: 1.1;
}
