/* ============================================
   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 (.tooltip_bottom_e1cd) is a descendant of
   .form-84c7 (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.up-7bc4 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".notification_easy_51eb" 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.out-b93e so it can't cause
   horizontal overflow anyway. */
.logo_hot_2eb6,
.current_6b6b,
.search_44fc,
.avatar-pro-85ea,
.module-wide-3882,
.warm-39f9,
.input_f35e,
.paragraph-old-554a,
.badge_2fb4,
.footer-9590,
.purple-6d7a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .label-up-a6c6 {
    padding: 8px 0;
  }
  
  .secondary_4070 img {
    height: 28px;
    width: auto;
  }
  
  .slider-paper-4ac7 {
    display: none !important;
  }
  
  .notification-top-6b76 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .notification-top-6b76 svg {
    width: 14px;
    height: 14px;
  }
  
  .hover-9794 {
    padding: 6px;
  }
  
  .heading-c71f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .search_44fc,
  .current_6b6b,
  .avatar-pro-85ea,
  .module-wide-3882,
  .avatar_dark_ea2b,
  .block-701a,
  .background-0a07,
  .heading-pink-8c72,
  .header_4ad5,
  .carousel-glass-9546,
  .info_c192,
  .north_048c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .silver-bd87,
  .texture_380a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tertiary_east_36dd,
  .block-3787,
  .dirty-1891,
  .feature_141e,
  .inner-b0c6,
  .focus-36d8,
  .out_46d1 {
    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 */
  .icon_cool_f0cb,
  .huge_7de2,
  .gradient-action-b1f1,
  .header-36e4,
  .small_3df2 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hard-1b6d,
  .tall_cfcd,
  .input-inner-0674,
  .feature_5345 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .pattern_paper_9d68,
  .video-fluid-189c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .menu-outer-881d,
  .picture_steel_58a6,
  .overlay-3c72,
  .box_inner_c6ed {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .element-dynamic-ef9f,
  .old_0e35,
  .focus_green_aa08,
  .dirty_98a6,
  .filter-47b0,
  .pro_7b5c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .icon_cool_f0cb,
  .huge_7de2,
  .header-36e4 {
    max-width: none !important;
  }
  
  .notification_easy_51eb {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hard-1b6d {
    font-size: 1.5rem !important;
  }
  
  .tall_cfcd {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .red_3bc7,
  .component_pressed_2585 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .input-inner-0674 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .iron_a22f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .aside-6bb0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .icon_cool_f0cb,
  .header-36e4 {
    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: 24bf */
.shadow-element-v7 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.3;
}
