/* Header v2 — 3-row platform chrome */

.site-header-v2 {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(7, 11, 16, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header-stack {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(0.75rem, 2vw, 1.25rem);
  box-sizing: border-box;
}

.site-header-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
}

.site-header-row-global {
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

/* Single-row masthead — logo top-left, main nav immediately to the right */
.site-header-v2 .site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  width: 100%;
  min-height: 3.75rem;
  padding: 0.55rem 0;
  box-sizing: border-box;
}

.site-header-v2 .site-header-inner > .site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.site-header-v2 .site-header-inner .site-header-primary-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
}

.site-header-v2 .site-header-utils {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  flex-shrink: 0;
}

.site-header-v2 .site-brand-logo {
  height: 2.25rem;
  max-width: min(200px, 38vw);
}

@media (min-width: 769px) {
  .site-header-v2 .site-brand-logo {
    height: 2.5rem;
    max-width: 220px;
  }
}

.site-header-row-global-start,
.site-header-row-global-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.site-header-row-global-end {
  flex: 1;
  justify-content: flex-end;
}

.site-header-row-primary {
  flex-wrap: wrap;
  padding: 0.15rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.site-header-primary-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
}

.header-primary-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.header-primary-link:hover {
  color: var(--accent-bright, #f5d078);
  background: rgba(232, 184, 74, 0.1);
}

.header-primary-link.active-tab {
  color: #f5d078;
  background: rgba(232, 184, 74, 0.16);
  box-shadow: inset 0 -2px 0 #e8b84a;
}

.header-league-pills {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  max-width: 42vw;
  padding-bottom: 0.1rem;
}

.header-league-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-league-pill.active-tab,
.header-league-pill:hover {
  color: var(--accent-bright);
  border-color: rgba(232, 184, 74, 0.45);
}

.header-alert-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
}

.header-alert-btn:hover {
  border-color: var(--border);
  color: var(--text);
}

.header-alert-label {
  font-size: 0.78rem;
  max-width: 6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-account-utils .nav-account-menu {
  margin-left: 0;
}

.header-search-desktop {
  min-width: 12rem;
  /* max-width: 16rem; — removed: was stacking search over Verifying/status on desktop */
}

@media (min-width: 1024px) {
  .site-header-mobile-search-row {
    display: none !important;
  }
}

.site-header-row-context {
  padding: 0.25rem 0 0.45rem;
  gap: 0.35rem;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.context-nav-tabs {
  -webkit-overflow-scrolling: touch;
}

.context-nav-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.context-nav-tab:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.context-nav-tab.active-tab {
  color: var(--accent-bright);
  border-color: rgba(232, 184, 74, 0.35);
  background: rgba(232, 184, 74, 0.08);
}

.context-nav-filter-btn {
  margin-left: auto;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .site-header-v2 {
    --site-header-height: 3.35rem;
  }

  /* Drawer behavior owned by mobile-v2.css at 1023px; legacy rules kept for ≤768 overlap */
  .site-header-row-context {
    padding-bottom: 0.35rem;
  }

  .header-league-pills {
    display: none;
  }
}

@media (min-width: 769px) {
  .site-header-v2 {
    --site-header-height: 7.25rem;
  }

  .site-header-row-primary .nav-mobile-drill {
    display: none;
  }

  .site-header-row-primary .nav-mobile-footer {
    display: none !important;
  }
}
