/* Compact navigation shared by v2. Overrides the legacy mobile cascade. */
body .v2-header {
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .v2-header-panel {
  position: relative;
  width: min(1560px, calc(100% - 6rem)) !important;
  min-height: 5.25rem !important;
  display: flex !important;
  flex-wrap: nowrap;
  gap: 2rem !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body .v2-header .v2-logo {
  font-size: 1.65rem !important;
}

body .v2-header .v2-nav {
  order: 0;
  width: auto;
  gap: .6rem;
}

body .v2-header .v2-nav-link {
  padding: 0 .6rem;
  font-size: .86rem;
  font-weight: 600;
  color: #d4d6db;
  background: transparent;
}

body .v2-header .v2-nav-link:hover,
body .v2-header .v2-nav-link.is-active {
  color: #fff;
}

body .v2-header .v2-search-toggle {
  width: 2.75rem !important;
  height: 2.75rem !important;
  flex: 0 0 2.75rem;
  display: grid !important;
  place-items: center;
  margin-left: auto;
  padding: 0;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #fff !important;
}

body .v2-header .v2-search-toggle svg {
  width: 1.5rem !important;
  height: 1.5rem !important;
  fill: none;
}

body .v2-header .v2-top-actions {
  display: flex !important;
  width: auto !important;
  margin-left: 0;
  gap: 0 !important;
}

body .v2-header .v2-avatar-button {
  width: 2.35rem !important;
  height: 2.35rem !important;
  border: 1px solid rgba(255,255,255,.3) !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.08) !important;
  font-size: .85rem;
  overflow: hidden;
}

body .v2-header .v2-search {
  display: flex !important;
  position: absolute !important;
  top: calc(100% + .5rem) !important;
  left: auto !important;
  right: 0 !important;
  width: min(28rem, calc(100vw - 2rem)) !important;
  min-width: 0 !important;
  min-height: 3.25rem !important;
  margin: 0;
  padding: .35rem .65rem !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  border-radius: 12px !important;
  background: rgba(19, 23, 29, .76) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.06) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform: translateY(-8px) scale(.985) !important;
  transform-origin: top right;
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none !important;
  transition: opacity .22s ease, transform .28s cubic-bezier(.2,.8,.2,1), visibility .28s;
}

body.is-v2-search-open .v2-header .v2-search {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto !important;
}

body .v2-header .v2-search input {
  min-width: 0;
  font-weight: 600;
}

/* The form already has a close button; suppress the browser's extra cross. */
body .v2-header .v2-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

body .v2-header .v2-search-close {
  display: grid !important;
  place-items: center;
  width: 2.5rem !important;
  height: 2.5rem !important;
  flex: 0 0 2.5rem !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 1.5rem;
}

body .v2-header .v2-search-dropdown {
  position: absolute;
  inset: calc(100% + .5rem) 0 auto !important;
  width: 100% !important;
  max-height: min(30rem, calc(100dvh - 11rem));
  border-color: rgba(255,255,255,.16);
  background: rgba(19, 23, 29, .86);
  box-shadow: 0 20px 52px rgba(0,0,0,.32);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.v2-header :is(button, a, summary):focus-visible {
  outline: 2px solid #87ffbb;
  outline-offset: 4px;
}

@media (max-width: 760px) {
  body .v2-header-panel {
    width: calc(100% - 2.5rem) !important;
    min-height: 4rem !important;
    gap: .75rem !important;
  }

  body .v2-header .v2-logo {
    font-size: 1.4rem !important;
  }

  body .v2-mobile-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body:not(.v2-cinema-home) .v2-shell {
    padding-top: 4.7rem !important;
  }

  body .v2-header .v2-search {
    width: min(28rem, calc(100vw - 2.5rem)) !important;
    transform-origin: top right;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .v2-header .v2-search {
    transition-duration: .01ms;
  }
}
