/* ============================================================
   Mobile UX layer — additive, mobile-only overrides
   — Bottom navigation bar (replaces drawer on mobile)
   — Compact hero action buttons
   — Safe-area handling + small polish
   — Scoped entirely inside max-width:767px so desktop is untouched
   ============================================================ */

/* Hidden by default (desktop/tablet); shown only inside the mobile media query below */
.bottom-nav {
  display: none;
}

@media (max-width: 767px) {

  /* ── Reserve space for the fixed bottom nav ── */
  .main-content {
    padding-bottom: calc(64px + env(safe-area-inset-bottom) + var(--space-lg));
  }

  /* ── Retire the hamburger/drawer — bottom nav replaces it ── */
  .nav__hamburger {
    display: none !important;
  }

  /* ============================================================
     Bottom Navigation Bar
     ============================================================ */
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px -12px rgba(0, 0, 0, 0.5);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }

  .bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    padding: 6px 2px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
  }

  .bottom-nav__item svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
  }

  .bottom-nav__label {
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: 0.01em;
  }

  .bottom-nav__item:active {
    transform: scale(0.94);
  }

  .bottom-nav__item--active {
    color: #ff3e3e;
    background: rgba(229, 57, 53, 0.12);
  }

  .bottom-nav__item--active svg {
    transform: translateY(-1px);
  }

  @media (prefers-reduced-motion: reduce) {
    .bottom-nav__item,
    .bottom-nav__item svg {
      transition: none;
    }
  }

  /* ============================================================
     Hero — compact, app-like action buttons
     ============================================================ */
  .hero-pills {
    margin-bottom: 10px;
  }

  .hero-genre-pills {
    margin-bottom: 8px;
  }

  .hero-description {
    margin-bottom: var(--space-md);
  }

  .hero-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  /* home.css sets `.hero-actions .btn{width:100%}` for the old stacked layout —
     reset it so flex sizing below (btn-watch-now/btn-secondary) takes over */
  .hero-actions .btn {
    width: auto;
  }

  .hero-actions .btn-lg {
    padding: 0 18px;
    height: 40px;
    min-height: 40px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    gap: 6px;
    white-space: nowrap;
  }

  .hero-actions .btn-lg svg {
    width: 15px;
    height: 15px;
  }

  .hero-actions .btn-watch-now {
    flex: 1 1 auto;
  }

  .hero-actions .btn-secondary {
    flex: 0 0 auto;
    padding: 0 16px;
  }

  /* ── Skeleton shimmer: respect reduced motion (already handled for nav-skeleton, missing here) ── */
  @media (prefers-reduced-motion: reduce) {
    .skeleton {
      animation: none;
    }
  }

  /* ── Share banner: stack on narrow phones instead of crowding ── */
  .share-banner {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
}

/* ── Extra-small phones ── */
@media (max-width: 380px) {
  .bottom-nav__label {
    font-size: 0.58rem;
  }

  .hero-actions .btn-lg {
    padding: 0 14px;
    font-size: 0.78rem;
  }

  .hero-actions .btn-watch-now {
    max-width: 170px;
  }
}
