/* ============================================
   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_east_18e1) is a descendant of
   .slider-a54e (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_9017 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".carousel-easy-3944" 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.box_9997 so it can't cause
   horizontal overflow anyway. */
.east-4efe,
.fast_102d,
.hard_b625,
.description_gas_750a,
.video-action-b4e7,
.first-c181,
.advanced_87e0,
.next_6f0c,
.block-7494,
.sidebar_pressed_60a2,
.progress_83e4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .tag-b998 {
    padding: 8px 0;
  }
  
  .inner_f98b img {
    height: 28px;
    width: auto;
  }
  
  .input-ae20 {
    display: none !important;
  }
  
  .message-last-bbf3 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .message-last-bbf3 svg {
    width: 14px;
    height: 14px;
  }
  
  .caption-81cb {
    padding: 6px;
  }
  
  .tooltip-blue-bf04 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .hard_b625,
  .fast_102d,
  .description_gas_750a,
  .video-action-b4e7,
  .green-b868,
  .outline-east-da11,
  .narrow-3e47,
  .block_pink_f444,
  .grid_1534,
  .frame_642e,
  .pressed-f0b2,
  .tag_5bb8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .gallery_left_d3ba,
  .carousel_4efb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .next_b477,
  .mini_f931,
  .feature-fbc7,
  .lite-ee73,
  .container-4d5d,
  .iron-e8f9,
  .notice-a0fd {
    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 */
  .component_soft_2909,
  .form-dynamic-ab72,
  .thumbnail-bronze-8a31,
  .list_north_3d3d,
  .middle_5e6a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .background-bd63,
  .table_0143,
  .section-f699,
  .tabs-up-a7e3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .photo-east-4b17,
  .tabs-e4b6 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .fresh-8946,
  .inner_c47f,
  .search_c3d3,
  .pattern-c706 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .fast-e807,
  .message-343e,
  .aside-thick-b673,
  .mini_28b5,
  .frame_1026,
  .primary-ed64 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .component_soft_2909,
  .form-dynamic-ab72,
  .list_north_3d3d {
    max-width: none !important;
  }
  
  .carousel-easy-3944 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .background-bd63 {
    font-size: 1.5rem !important;
  }
  
  .table_0143 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .selected-b10f,
  .card-e532 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .section-f699 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .purple_190d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .panel-9f05 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .component_soft_2909,
  .list_north_3d3d {
    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: 29d1 */
.shadow-element-u8 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.1;
}
