/* ============================================
   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 (.small-e43e) is a descendant of
   .tabs_1925 (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.pink-e61b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".label-gold-e1ef" 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.slider_hot_c35b so it can't cause
   horizontal overflow anyway. */
.small-ee8e,
.media-selected-fad9,
.footer_yellow_2f85,
.popup_c502,
.icon_pink_5855,
.pink-48c2,
.west-8c7a,
.card_642f,
.image-cool-bbd0,
.item_dark_a4e2,
.cold-3d47 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .notification_6c2e {
    padding: 8px 0;
  }
  
  .fixed_1b12 img {
    height: 28px;
    width: auto;
  }
  
  .row-up-ddf6 {
    display: none !important;
  }
  
  .tall-d02c {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tall-d02c svg {
    width: 14px;
    height: 14px;
  }
  
  .middle_12a0 {
    padding: 6px;
  }
  
  .old_4f82 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .footer_yellow_2f85,
  .media-selected-fad9,
  .popup_c502,
  .icon_pink_5855,
  .gas_81ea,
  .description-63bd,
  .light_47f0,
  .glass_36bc,
  .west-c83b,
  .outline_new_2f95,
  .logo-pressed-725e,
  .hover_small_9915 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .border-cold-1d97,
  .first-407c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .main-up-87ab,
  .advanced-d1c9,
  .column_stale_0d84,
  .icon_60f7,
  .popup_bbf6,
  .hard-66d5,
  .mini-78c5 {
    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 */
  .pink-e429,
  .south_563c,
  .heading-next-337d,
  .wood_bbf3,
  .wrapper_middle_aa6e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .paragraph-outer-489a,
  .input-0738,
  .static-0d20,
  .modal-e2b2 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .breadcrumb-4aa6,
  .carousel_9eb8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .carousel-e77d,
  .secondary-817b,
  .soft_006a,
  .east_c2ba {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .outline_336b,
  .cool_694c,
  .link_copper_b744,
  .hard-33e3,
  .breadcrumb-4b14,
  .pink-a56f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pink-e429,
  .south_563c,
  .wood_bbf3 {
    max-width: none !important;
  }
  
  .label-gold-e1ef {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .paragraph-outer-489a {
    font-size: 1.5rem !important;
  }
  
  .input-0738 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .short_0dde,
  .secondary-smooth-1e06 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .static-0d20 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .module-focused-3d1c {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .smooth_4fc4 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pink-e429,
  .wood_bbf3 {
    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: 0cc9 */
.widget-item-w0 {
  padding: 0.4rem;
  font-size: 14px;
  line-height: 1.0;
}
