/* ============================================
   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 (.video_large_55eb) is a descendant of
   .hover-fluid-2271 (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.list-a53a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".avatar_5db8" 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.background_139f so it can't cause
   horizontal overflow anyway. */
.slow-224b,
.icon_pressed_9744,
.main-a0d4,
.warm_c257,
.status_06c3,
.status_dim_dee0,
.panel-9f7f,
.short_327c,
.image_7dc0,
.search-old-4fdd,
.pagination-1d41 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .dim-4f33 {
    padding: 8px 0;
  }
  
  .slow_a491 img {
    height: 28px;
    width: auto;
  }
  
  .outline-cee6 {
    display: none !important;
  }
  
  .selected-4fe5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .selected-4fe5 svg {
    width: 14px;
    height: 14px;
  }
  
  .silver-0b7a {
    padding: 6px;
  }
  
  .texture-ce05 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .main-a0d4,
  .icon_pressed_9744,
  .warm_c257,
  .status_06c3,
  .item-left-fdea,
  .white_bfb2,
  .secondary-ac5f,
  .logo_096d,
  .middle-5a93,
  .east-4425,
  .background_motion_e81a,
  .left_b23d {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .secondary-d18d,
  .section-c3d4 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .accent-feb2,
  .primary-9642,
  .header-4e29,
  .huge_7218,
  .form_outer_5874,
  .frame_7938,
  .main-complex-2edb {
    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 */
  .dim_df45,
  .orange_b833,
  .mini_6305,
  .nav-gas-3282,
  .module_6b9c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .shadow-c0ac,
  .cool_653e,
  .tooltip-926c,
  .box_02a4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .left-c7e4,
  .center_9bc4 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .gradient_40a1,
  .carousel-left-c2de,
  .input-5f83,
  .tabs_8a3e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .progress_small_f360,
  .label_ebae,
  .pink-5fc6,
  .article_fluid_b4e0,
  .message-0eb1,
  .article-f884 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dim_df45,
  .orange_b833,
  .nav-gas-3282 {
    max-width: none !important;
  }
  
  .avatar_5db8 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .shadow-c0ac {
    font-size: 1.5rem !important;
  }
  
  .cool_653e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .warm_5294,
  .layout_hard_6b2b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tooltip-926c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .shadow-3ed4 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .media_52e2 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dim_df45,
  .nav-gas-3282 {
    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: dfe5 */
.widget-item-d1 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.3;
}
