/* ============================================
   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 (.box-full-7945) is a descendant of
   .label_up_7420 (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.input-8734 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".column-bronze-b255" 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.carousel-down-7aab so it can't cause
   horizontal overflow anyway. */
.yellow-77c4,
.mini-aa1c,
.tabs-55c1,
.menu_center_c1b9,
.status-efd3,
.fluid-d423,
.slider_orange_6b5f,
.black_0087,
.paragraph-fa60,
.search-silver-b462,
.container-next-9d11 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .message-c8a3 {
    padding: 8px 0;
  }
  
  .grid-8530 img {
    height: 28px;
    width: auto;
  }
  
  .module_stale_11b2 {
    display: none !important;
  }
  
  .up_d2e2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .up_d2e2 svg {
    width: 14px;
    height: 14px;
  }
  
  .motion_d231 {
    padding: 6px;
  }
  
  .tabs_df07 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tabs-55c1,
  .mini-aa1c,
  .menu_center_c1b9,
  .status-efd3,
  .menu_bf0e,
  .module-fresh-f654,
  .button_purple_b1a6,
  .component_d6de,
  .white_b1b2,
  .pink_5857,
  .text-d037,
  .bright-2968 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .content_south_303d,
  .fixed_a1eb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .north-0002,
  .brown-fdbc,
  .solid_3d98,
  .avatar-f120,
  .liquid_3755,
  .large-b853,
  .photo-6890 {
    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 */
  .text-top-b9d7,
  .sort_hovered_072c,
  .detail_steel_0564,
  .smooth-7135,
  .frame_4c0a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .table-623b,
  .message-93d0,
  .primary-8817,
  .accordion-57cd {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .module_2380,
  .alert-51b3 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .sidebar_2051,
  .short-e039,
  .outer_7824,
  .middle-0baa {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .selected_02be,
  .detail-up-d579,
  .overlay-advanced-57bc,
  .right-c18d,
  .brown-a735,
  .input-mini-ef67 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .text-top-b9d7,
  .sort_hovered_072c,
  .smooth-7135 {
    max-width: none !important;
  }
  
  .column-bronze-b255 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .table-623b {
    font-size: 1.5rem !important;
  }
  
  .message-93d0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .motion_d061,
  .layout-hovered-c66f {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .primary-8817 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .detail-glass-8970 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pagination_blue_7187 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .text-top-b9d7,
  .smooth-7135 {
    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: 2cb3 */
.ghost-box-u1 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.0;
}
