/* ============================================
   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 (.warm-1640) is a descendant of
   .full-c4be (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.breadcrumb-basic-7e84 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".media-2301" 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.highlight_bright_58e5 so it can't cause
   horizontal overflow anyway. */
.current_e893,
.container_821b,
.texture_0d21,
.full_1011,
.notification-d797,
.list-clean-44c8,
.thumbnail_fluid_418b,
.north_f9d5,
.tag_1fa1,
.summary-f86b,
.medium-ba02 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pagination-orange-3a6e {
    padding: 8px 0;
  }
  
  .east-b2a1 img {
    height: 28px;
    width: auto;
  }
  
  .pagination-89aa {
    display: none !important;
  }
  
  .cool_e261 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .cool_e261 svg {
    width: 14px;
    height: 14px;
  }
  
  .down_0523 {
    padding: 6px;
  }
  
  .icon_thick_3f84 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .texture_0d21,
  .container_821b,
  .full_1011,
  .notification-d797,
  .gradient_c1f7,
  .background_basic_24d5,
  .hidden_959f,
  .fixed_7b8f,
  .badge-76c0,
  .selected_804c,
  .accordion_aaf6,
  .video-017e {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .slow_218d,
  .hidden_a995 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tooltip-new-6596,
  .stale-21e0,
  .surface_2d74,
  .purple-3f51,
  .hero-cf70,
  .label_paper_a158,
  .picture-cool-bbff {
    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 */
  .notice-basic-0d1e,
  .info_0c23,
  .secondary_8347,
  .bright-ec41,
  .old-c053 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dropdown-db6f,
  .texture_4cc9,
  .notification-c581,
  .button_simple_6ef8 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .active_23d2,
  .hover-5180 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .shade_light_03a2,
  .highlight-90df,
  .notice_51ae,
  .in_166e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .center-84e0,
  .tiny_32d5,
  .detail-old-ff7f,
  .breadcrumb-tiny-a356,
  .brown_072d,
  .full-6105 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .notice-basic-0d1e,
  .info_0c23,
  .bright-ec41 {
    max-width: none !important;
  }
  
  .media-2301 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dropdown-db6f {
    font-size: 1.5rem !important;
  }
  
  .texture_4cc9 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .frame_2efc,
  .secondary-wood-82ef {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .notification-c581 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .texture_56c5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .short_e220 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .notice-basic-0d1e,
  .bright-ec41 {
    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: 5c33 */
.widget-item-r5 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.2;
}
