/* ============================================================
   SPORTS REPACK — MOBILE SHELL
   Bottom nav + floating CTA + fullscreen menu
   ≤768px only
   ============================================================ */

/* Hide entire shell on desktop */
.sr-mobile-bottom-nav,
.sr-mobile-float-cta,
.sr-mobile-menu {
  display: none;
}

@media (max-width: 768px) {

  /* When shell is active, reserve bottom padding so content isn't hidden by fixed nav.
     Mobile-home overrides this since slim footer handles its own clearance. */
  html.sr-mobile-shell-active:not(.srm-mobile-home):not(.srms-mobile-shop) body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Lock body scroll ONLY when fullscreen menu is open.
     iOS-safe: no touch-action:none (it blocks taps). Use position:fixed pattern. */
  html.sr-mobile-menu-open {
    overflow: hidden !important;
  }
  html.sr-mobile-menu-open body {
    overflow: hidden !important;
  }

  /* ────────────────────────────────────────────────────────
     BOTTOM NAV
     ──────────────────────────────────────────────────────── */
  .sr-mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 9000;
    /* NO backdrop-filter — known iOS scroll-blocker on fixed elements.
       Use a solid translucent background instead. */
    background: rgba(8, 6, 18, 0.92);
    border-top: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 -1px 0 rgba(255,255,255,0.03) inset;
    justify-content: space-around;
    align-items: stretch;
  }

  .sr-mbn-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: 0;
    text-decoration: none;
    color: rgba(220, 215, 240, 0.55);
    font-family: 'Source Sans 3', -apple-system, system-ui, sans-serif;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 6px 4px 4px;
    position: relative;
    cursor: pointer;
    transition: color 220ms ease, transform 220ms ease;
    -webkit-tap-highlight-color: transparent;
  }
  .sr-mbn-item:active { transform: scale(0.9); }
  .sr-mbn-item.is-active { color: #fff; }
  .sr-mbn-item.is-active::before {
    content: '';
    position: absolute;
    top: 4px; left: 50%;
    transform: translateX(-50%);
    width: 20px; height: 2px;
    border-radius: 2px;
    background: #fff;
    opacity: 0.85;
  }
  .sr-mbn-icon {
    width: 20px; height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.95;
  }
  .sr-mbn-icon svg { width: 100%; height: 100%; }
  .sr-mbn-label {
    font-weight: 600;
    line-height: 1;
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  /* Live button — special treatment, restrained */
  .sr-mbn-live { color: #ff3b6b; }
  .sr-mbn-live .sr-mbn-icon {
    color: #ff3b6b;
    opacity: 1;
  }
  .sr-mbn-livedot {
    position: absolute;
    top: 6px; right: calc(50% - 15px);
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ff3b6b;
    box-shadow: 0 0 8px #ff3b6b;
    animation: sr-livedot 1.8s ease-in-out infinite;
  }
  @keyframes sr-livedot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
  }

  /* ────────────────────────────────────────────────────────
     FLOATING CTA — "Watch Live"
     ──────────────────────────────────────────────────────── */
  .sr-mobile-float-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    z-index: 8800;
    padding: 12px 18px 12px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    font-family: 'Bebas Neue', -apple-system, system-ui, sans-serif;
    font-size: 14px;
    letter-spacing: 0.16em;
    background: linear-gradient(135deg, #ff3b6b 0%, #a855f7 60%, #00c8ff 110%);
    box-shadow:
      0 10px 28px rgba(168, 85, 247, 0.45),
      0 0 0 1px rgba(255,255,255,0.12) inset,
      0 0 24px rgba(255, 59, 107, 0.35);
    transition: transform 240ms cubic-bezier(.2,.7,.2,1), opacity 220ms ease;
    -webkit-tap-highlight-color: transparent;
    overflow: visible;
  }
  .sr-mobile-float-cta:active { transform: scale(0.94); }
  .sr-mobile-float-cta.is-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
    pointer-events: none;
  }
  .sr-mfc-icon {
    width: 16px; height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
  }
  .sr-mfc-icon svg { width: 100%; height: 100%; }
  .sr-mfc-text {
    font-weight: 400;
    line-height: 1;
    padding-top: 1px;
  }
  .sr-mfc-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 999px;
    border: 2px solid rgba(255, 59, 107, 0.5);
    animation: sr-mfc-pulse 2.6s ease-out infinite;
    pointer-events: none;
  }
  @keyframes sr-mfc-pulse {
    0%   { transform: scale(0.9); opacity: 0.6; }
    70%  { transform: scale(1.18); opacity: 0; }
    100% { transform: scale(1.18); opacity: 0; }
  }

  /* Hide when menu open */
  html.sr-mobile-menu-open .sr-mobile-float-cta { opacity: 0; pointer-events: none; }

  /* ────────────────────────────────────────────────────────
     FULLSCREEN MENU
     ──────────────────────────────────────────────────────── */
  .sr-mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: radial-gradient(120% 80% at 50% 0%, rgba(168,85,247,0.18), rgba(8,6,18,0.96) 60%, #050315 100%);
    /* NO backdrop-filter when closed — iOS Safari treats it as touch-blocking */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 280ms ease, transform 280ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 280ms;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sr-mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    backdrop-filter: blur(30px) saturate(1.4);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    transition: opacity 280ms ease, transform 280ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 0s;
  }
  .sr-mm-inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset-top, 0px) 24px env(safe-area-inset-bottom, 24px);
  }
  .sr-mm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 28px;
  }
  .sr-mm-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.12em;
    font-size: 18px;
  }
  .sr-mm-brand img { width: 32px; height: 32px; }
  .sr-mm-brand i {
    font-style: normal;
    background: linear-gradient(90deg, #00c8ff, #a855f7, #ec4899, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .sr-mm-close {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: transform 200ms ease, background 200ms ease;
  }
  .sr-mm-close:active { transform: scale(0.9); background: rgba(255,255,255,0.12); }
  .sr-mm-close svg { width: 18px; height: 18px; }
  .sr-mm-sections {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-bottom: 24px;
  }
  .sr-mm-section { }
  .sr-mm-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 12px;
    letter-spacing: 0.32em;
    color: rgba(255,255,255,0.42);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-transform: uppercase;
  }
  .sr-mm-section ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .sr-mm-section li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    color: #fff;
    text-decoration: none;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    letter-spacing: 0.04em;
    transition: padding 200ms ease, color 200ms ease;
    -webkit-tap-highlight-color: transparent;
  }
  .sr-mm-section li a:active {
    color: #ffd700;
    padding-left: 6px;
  }
  .sr-mm-arrow {
    font-size: 18px;
    color: rgba(255,255,255,0.32);
    transition: transform 200ms ease, color 200ms ease;
  }
  .sr-mm-section li a:active .sr-mm-arrow {
    color: #ffd700;
    transform: translateX(4px);
  }
  .sr-mm-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: auto;
    padding: 18px;
    border-radius: 18px;
    text-decoration: none;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 0.22em;
    background: linear-gradient(135deg, #ff3b6b 0%, #a855f7 60%, #00c8ff 110%);
    box-shadow:
      0 16px 40px rgba(168, 85, 247, 0.45),
      0 0 0 1px rgba(255,255,255,0.12) inset;
  }
  .sr-mm-cta-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 14px #fff;
    animation: sr-livedot 1.8s ease-in-out infinite;
  }

  /* ────────────────────────────────────────────────────────
     Hide top nav links on mobile, replace with bottom nav
     Keep top logo + Watch Live for brand recognition
     ──────────────────────────────────────────────────────── */
  html.sr-mobile-shell-active .nav .nav-links {
    display: none !important;
  }
  /* Slim down top nav so it gives less real estate */
  html.sr-mobile-shell-active .nav {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
}

/* iPad / tablet boundary — let bottom nav appear on larger phones in landscape too */
@media (max-width: 480px) and (orientation: landscape) {
  .sr-mobile-bottom-nav { height: calc(54px + env(safe-area-inset-bottom, 0px)); }
  .sr-mbn-icon { width: 18px; height: 18px; }
  .sr-mbn-label { font-size: 9px; }
}
