/* =====================================================================
   ZAPFLIX — TOP NAVBAR (desktop). One look on every public page:
   glass bar, gradient wordmark, segmented links, pill buttons,
   segmented language switch. Phones (≤900px) keep the hamburger bar
   from css/mobile.css, so everything here is desktop-scoped.
   The language switcher markup differs per page (inline styles and
   " | " text separators), so it is styled by structure, not by markup.
   ===================================================================== */
/* Phone turned sideways (the pages use viewport-fit=cover): the notch / Dynamic Island covers
   the left or right edge, so the page keeps to the safe area. env() is 0 on every other screen. */
html body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

@media (min-width: 901px) {
  .navbar {
    height: 72px;
    /* a phone turned sideways can be wider than 900px: stay clear of the notch / Dynamic Island */
    padding-left: max(4%, env(safe-area-inset-left)) !important;
    padding-right: max(4%, env(safe-area-inset-right)) !important;
    gap: 20px;
  }
  .navbar .nav-left { gap: 28px; min-width: 0; }
  .navbar .nav-right { gap: 10px; }
  /* Phone-only header pieces (search icon + sign-in) that js/zf-mobile.js adds on every touch
     screen; this bar already has both, so on a sideways phone they only overlapped it. */
  .navbar .zf-m-actions { display: none !important; }

  /* wordmark */
  .navbar .logo {
    font-size: 30px !important;
    line-height: 1;
    font-weight: 900 !important;
    letter-spacing: -0.05em !important;
    text-transform: uppercase;
    text-decoration: none;
    background: linear-gradient(135deg, #ff6b72 0%, #e50914 52%, #9e0610 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #e50914;
    filter: drop-shadow(0 2px 14px rgba(229, 9, 20, 0.35));
    transition: filter 0.3s ease, transform 0.3s cubic-bezier(0.22, 0.8, 0.24, 1);
  }
  .navbar .logo:hover { filter: drop-shadow(0 2px 18px rgba(229, 9, 20, 0.6)); transform: translateY(-1px); }

  /* links: one segmented glass group */
  .navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
  .navbar .nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 16px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72) !important;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  }
  .navbar .nav-links a:hover { color: #fff !important; background: rgba(255, 255, 255, 0.08) !important; }
  .navbar .nav-links a.active {
    color: #0a0a0b !important;
    background: #fff !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
  }

  /* rewards: red pill inside the group, no pulsing */
  .navbar .rewards-btn-glow {
    color: #fff !important;
    background: linear-gradient(135deg, #ff2c36 0%, #e50914 55%, #b00610 100%) !important;
    border: 0 !important;
    box-shadow: 0 6px 18px rgba(229, 9, 20, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    animation: none !important;
    font-weight: 700 !important;
  }
  .navbar .nav-links a.rewards-btn-glow:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #ff3d46 0%, #f40612 55%, #c20812 100%) !important;
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transform: none;
  }
  .navbar .zf-nav-ico { flex: none; }

  /* report an issue: quiet ghost pill next to the group */
  .navbar .zf-fb-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px !important;
    margin-inline-start: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14) !important;
    color: rgba(255, 255, 255, 0.72) !important;
    font: inherit;
    font-size: 13px !important;
    font-weight: 600;
    white-space: nowrap;
    animation: none !important;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  }
  .navbar .zf-fb-btn:hover { color: #fff !important; background: rgba(255, 255, 255, 0.08) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26) !important; transform: none; }

  /* language: EN | AR | ES → segmented control (the " | " text is hidden) */
  .navbar .lang-switcher {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    margin: 0 !important;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    font-size: 0 !important;
    color: transparent !important;
  }
  .navbar .lang-switcher a {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.62) !important;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .navbar .lang-switcher a:hover { color: #fff !important; background: rgba(255, 255, 255, 0.08); }
  .navbar .lang-switcher a[style*="bold"] {
    color: #0a0a0b !important;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }

  /* search toggle → round glass button */
  .navbar .search-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  }
  .navbar .search-toggle-btn:hover { background: rgba(255, 255, 255, 0.14) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }

  /* account buttons → pills */
  .navbar .nav-right .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap;
  }
  .navbar .nav-right .btn-outline {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 0 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16) !important;
  }
  .navbar .nav-right .btn-outline:hover { background: rgba(255, 255, 255, 0.14) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3) !important; }
  .navbar .nav-right .btn-primary {
    background: linear-gradient(135deg, #ff2c36 0%, #e50914 55%, #b00610 100%) !important;
    box-shadow: 0 8px 22px rgba(229, 9, 20, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  }
  .navbar .nav-right .btn-logout {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 0 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14) !important;
    color: rgba(255, 255, 255, 0.85) !important;
  }
  .navbar .nav-right .btn-logout:hover { background: rgba(255, 255, 255, 0.14) !important; color: #fff !important; }
  .navbar .user-avatar {
    background: linear-gradient(135deg, #ff2c36, #b00610) !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
  }
  .navbar .role-badge { border-radius: 999px; }

  .navbar a:focus-visible,
  .navbar button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
}

/* narrower desktops, tablets and big phones turned sideways: keep everything on one line */
@media (min-width: 901px) and (max-width: 1180px) {
  .navbar { gap: 12px; }
  .navbar .nav-left { gap: 14px; flex: none; }
  .navbar .logo { font-size: 24px !important; }
  .navbar .nav-links a { height: 34px; padding: 0 11px !important; font-size: 13px; }
  .navbar .zf-fb-btn span { display: none; }
  .navbar .zf-fb-btn { width: 34px; height: 34px; padding: 0 !important; justify-content: center; }
  .navbar .nav-right { flex: 1 1 auto; min-width: 0; justify-content: flex-end; gap: 8px; }
  .navbar .lang-switcher a { min-width: 32px; height: 28px; padding: 0 7px; font-size: 11.5px !important; }
  .navbar .search-toggle-btn { width: 36px; height: 36px; }
  .navbar .nav-right .btn { height: 36px; padding: 0 14px !important; font-size: 13px !important; }
  /* the search field takes what is left of the bar instead of a fixed 320–340px */
  .navbar .netflix-search-box { flex: none; }
  .navbar.search-navbar .netflix-search-box { flex: 0 1 340px; min-width: 0; }
  .navbar.search-navbar .netflix-search-box .search-input-wrapper { width: 100% !important; min-width: 0; }
  .navbar .netflix-search-box.active:not(#netflixSearchBox) .search-input-wrapper { width: clamp(150px, 20vw, 240px); }
}
/* big phones turned sideways (915–932px): Sign In stays, Sign Up is the hero's own button */
@media (min-width: 901px) and (max-width: 1000px) {
  .navbar .nav-right > a.btn-outline ~ a.btn-primary { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .navbar .logo,
  .navbar .nav-links a,
  .navbar .lang-switcher a { transition: none; }
}

