/* ============================================
   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 (.shade-d221) is a descendant of
   .summary-41c9 (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.message_wood_9bbe {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hot_675d" 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.fixed-e759 so it can't cause
   horizontal overflow anyway. */
.accent_black_59e5,
.component_gold_8e72,
.border_cad3,
.tabs-smooth-6452,
.new-471e,
.up_2bcf,
.preview_4a31,
.clean-f544,
.caption_4992,
.box_beed,
.pagination-bfd1 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .disabled-basic-c4f5 {
    padding: 8px 0;
  }
  
  .title_88c7 img {
    height: 28px;
    width: auto;
  }
  
  .fixed-b7ee {
    display: none !important;
  }
  
  .down-4c07 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .down-4c07 svg {
    width: 14px;
    height: 14px;
  }
  
  .secondary_01cf {
    padding: 6px;
  }
  
  .modal_mini_d333 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .border_cad3,
  .component_gold_8e72,
  .tabs-smooth-6452,
  .new-471e,
  .sort-4891,
  .nav_bronze_0c35,
  .chip-simple-63f6,
  .static-8efb,
  .notification_9f14,
  .header-east-0c7a,
  .list-90eb,
  .item-e9bb {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .top-6fe1,
  .menu_huge_38d7 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .surface-4067,
  .item_thick_ba93,
  .table-rough-35a7,
  .iron_12a6,
  .primary_2fea,
  .progress_dim_2acf,
  .modal_blue_e0d1 {
    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 */
  .element_orange_b22c,
  .avatar_eaea,
  .focus_east_9104,
  .hovered_80e6,
  .main-9e30 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .sidebar-blue-cb25,
  .info-fixed-f1e9,
  .status-current-3a91,
  .easy-682e {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .fast_4722,
  .last-128c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .banner_e639,
  .section_1036,
  .carousel_7700,
  .mask_c32b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .feature-8ff4,
  .texture_4f4e,
  .plasma_2a50,
  .secondary-67bf,
  .secondary-e357,
  .badge-dc9b {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .element_orange_b22c,
  .avatar_eaea,
  .hovered_80e6 {
    max-width: none !important;
  }
  
  .hot_675d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .sidebar-blue-cb25 {
    font-size: 1.5rem !important;
  }
  
  .info-fixed-f1e9 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .outline_2961,
  .fresh_5d55 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .status-current-3a91 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .layout_plasma_089d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .inner-96aa {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .element_orange_b22c,
  .hovered_80e6 {
    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: 529c */
.widget-item-b5 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.2;
}
