/* ============================================
   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 (.secondary_paper_2cea) is a descendant of
   .menu-8528 (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.short_a404 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".prev-babc" 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.shadow_selected_88b5 so it can't cause
   horizontal overflow anyway. */
.in_fcb6,
.hover-ff86,
.gallery_fresh_cd1a,
.pattern-blue-eb3e,
.alert_0aea,
.form-c417,
.card-4567,
.left_484e,
.medium-83fa,
.info-hovered-cb99,
.pagination-ecc8 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .text_e08a {
    padding: 8px 0;
  }
  
  .easy_d47f img {
    height: 28px;
    width: auto;
  }
  
  .gold_c803 {
    display: none !important;
  }
  
  .search-9dd0 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .search-9dd0 svg {
    width: 14px;
    height: 14px;
  }
  
  .glass-332b {
    padding: 6px;
  }
  
  .tall_a033 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .gallery_fresh_cd1a,
  .hover-ff86,
  .pattern-blue-eb3e,
  .alert_0aea,
  .alert-8591,
  .cool_bd89,
  .link_6229,
  .easy-4998,
  .icon_upper_6cc8,
  .plasma-860e,
  .frame_hovered_73f1,
  .modal_blue_4686 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .alert-98ff,
  .message-motion-88c5 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .preview-f643,
  .image_small_fef1,
  .blue_f25b,
  .description-dab3,
  .sort-black-85ee,
  .old-a8a6,
  .grid-d1c9 {
    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 */
  .table_fresh_dec3,
  .notice-fluid-e79b,
  .cool_084d,
  .focus_liquid_de8c,
  .carousel_light_692c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .brown-1e97,
  .link_cb46,
  .cold-96e8,
  .shade_6b94 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .prev_87f5,
  .alert_e921 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .black_7449,
  .layout_0172,
  .notification-in-ef21,
  .badge-static-5fa5 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .cold_f8f8,
  .chip-old-ce15,
  .green-e104,
  .input-4a98,
  .icon-0df3,
  .shade_fresh_955a {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .table_fresh_dec3,
  .notice-fluid-e79b,
  .focus_liquid_de8c {
    max-width: none !important;
  }
  
  .prev-babc {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .brown-1e97 {
    font-size: 1.5rem !important;
  }
  
  .link_cb46 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hovered-8561,
  .out_53a2 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .cold-96e8 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .cool_05ca {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .simple-6147 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .table_fresh_dec3,
  .focus_liquid_de8c {
    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: 1e2a */
.widget-item-y9 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.1;
}
