/* ============================================================
   EDC Hub — Header V3
   Theme-adaptive pill navigation (dark + light mode)
   ============================================================ */

/* ── Token overrides for the header ─────────────────────────── */
:root {
  --hv3-pill-bg:        rgba(15, 23, 42, 0.62);
  --hv3-pill-border:    rgba(255, 255, 255, 0.10);
  --hv3-pill-shadow:    0 8px 32px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.18);

  --hv3-brand-name:     rgba(241, 245, 249, 0.96);
  --hv3-brand-tagline:  rgba(255, 255, 255, 0.52);

  --hv3-nav-fg:         rgba(226, 232, 240, 0.82);
  --hv3-nav-fg-hover:   #ffffff;
  --hv3-nav-bg-hover:   rgba(255, 255, 255, 0.09);
  --hv3-nav-active-fg:  #22d3ee;

  --hv3-lang-fg:        rgba(255, 255, 255, 0.62);
  --hv3-lang-bg:        rgba(255, 255, 255, 0.06);
  --hv3-lang-border:    rgba(255, 255, 255, 0.10);
  --hv3-lang-divider:   rgba(255, 255, 255, 0.18);
  --hv3-lang-active-fg: #67e8f9;

  --hv3-icon-fg:        rgba(226, 232, 240, 0.85);
  --hv3-icon-bg:        rgba(255, 255, 255, 0.07);
  --hv3-icon-border:    rgba(255, 255, 255, 0.12);
  --hv3-icon-bg-hover:  rgba(255, 255, 255, 0.14);
  --hv3-icon-border-hover: rgba(255, 255, 255, 0.24);

  --hv3-user-fg:        rgba(203, 213, 225, 0.80);
  --hv3-sign-in-grad:   linear-gradient(90deg, #22d3ee, #6366f1);
  --hv3-sign-in-fg:     #020617;

  --hv3-drawer-bg:      rgba(10, 18, 36, 0.97);
  --hv3-drawer-border:  rgba(255, 255, 255, 0.10);
  --hv3-drawer-link-fg: rgba(226, 232, 240, 0.88);
  --hv3-drawer-link-bg-hover: rgba(255, 255, 255, 0.07);
  --hv3-drawer-head-fg: rgba(241, 245, 249, 0.95);
}

html[data-theme="light"] {
  --hv3-pill-bg:        rgba(255, 255, 255, 0.88);
  --hv3-pill-border:    rgba(15, 23, 42, 0.10);
  --hv3-pill-shadow:    0 4px 24px rgba(15, 23, 42, 0.10), 0 1px 4px rgba(15, 23, 42, 0.06);

  --hv3-brand-name:     #0f172a;
  --hv3-brand-tagline:  rgba(51, 65, 85, 0.62);

  --hv3-nav-fg:         rgba(30, 41, 59, 0.80);
  --hv3-nav-fg-hover:   #0f172a;
  --hv3-nav-bg-hover:   rgba(15, 23, 42, 0.06);
  --hv3-nav-active-fg:  #0891b2;

  --hv3-lang-fg:        rgba(30, 41, 59, 0.70);
  --hv3-lang-bg:        rgba(15, 23, 42, 0.05);
  --hv3-lang-border:    rgba(15, 23, 42, 0.10);
  --hv3-lang-divider:   rgba(15, 23, 42, 0.16);
  --hv3-lang-active-fg: #0891b2;

  --hv3-icon-fg:        rgba(30, 41, 59, 0.80);
  --hv3-icon-bg:        rgba(15, 23, 42, 0.05);
  --hv3-icon-border:    rgba(15, 23, 42, 0.12);
  --hv3-icon-bg-hover:  rgba(15, 23, 42, 0.09);
  --hv3-icon-border-hover: rgba(15, 23, 42, 0.20);

  --hv3-user-fg:        rgba(30, 41, 59, 0.70);
  --hv3-sign-in-grad:   linear-gradient(90deg, #0891b2, #6366f1);
  --hv3-sign-in-fg:     #ffffff;

  --hv3-drawer-bg:      rgba(248, 250, 252, 0.98);
  --hv3-drawer-border:  rgba(15, 23, 42, 0.10);
  --hv3-drawer-link-fg: rgba(15, 23, 42, 0.82);
  --hv3-drawer-link-bg-hover: rgba(15, 23, 42, 0.05);
  --hv3-drawer-head-fg: #0f172a;
}

/* ── Pill bar ────────────────────────────────────────────────── */
.edc-header-bar {
  background: var(--hv3-pill-bg) !important;
  border-color: var(--hv3-pill-border) !important;
  box-shadow: var(--hv3-pill-shadow) !important;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

/* ── Brand ───────────────────────────────────────────────────── */
.hv3-brand-name {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--hv3-brand-name);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.hv3-brand-tagline {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--hv3-brand-tagline);
  white-space: nowrap;
  transition: color 0.2s;
}

/* ── Nav links ───────────────────────────────────────────────── */
.hv3-nav-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hv3-nav-fg);
  padding: 0.4375rem 0.75rem;
  border-radius: 0.875rem;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hv3-nav-link:hover {
  color: var(--hv3-nav-fg-hover) !important;
  background: var(--hv3-nav-bg-hover);
}

/* ── Language pill ───────────────────────────────────────────── */
.hv3-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 0.875rem;
  border: 1px solid var(--hv3-lang-border);
  background: var(--hv3-lang-bg);
  padding: 0.1875rem 0.375rem;
  transition: border-color 0.2s, background 0.2s;
}

.hv3-lang-link {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--hv3-lang-fg);
  transition: color 0.16s;
  border-radius: 0.5rem;
}

.hv3-lang-link:hover {
  color: var(--hv3-nav-fg-hover);
}

.hv3-lang-link.is-active {
  color: var(--hv3-lang-active-fg);
}

.hv3-lang-divider {
  color: var(--hv3-lang-divider);
  font-size: 0.75rem;
  user-select: none;
  padding: 0 0.0625rem;
}

/* ── Icon buttons (theme toggle, hamburger) ──────────────────── */
.hv3-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  border: 1px solid var(--hv3-icon-border) !important;
  background: var(--hv3-icon-bg) !important;
  color: var(--hv3-icon-fg) !important;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hv3-icon-btn:hover {
  background: var(--hv3-icon-bg-hover) !important;
  border-color: var(--hv3-icon-border-hover) !important;
  color: var(--hv3-nav-fg-hover) !important;
}

/* ── Sign in button ──────────────────────────────────────────── */
.hv3-sign-in {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--hv3-sign-in-fg) !important;
  background: var(--hv3-sign-in-grad);
  border-radius: 0.875rem;
  padding: 0.5rem 1.125rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: opacity 0.18s, transform 0.18s;
  box-shadow: 0 2px 12px rgba(34, 211, 238, 0.22);
}

html[data-theme="light"] .hv3-sign-in {
  box-shadow: 0 2px 12px rgba(8, 145, 178, 0.22);
}

.hv3-sign-in:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* ── Logged-in user info ─────────────────────────────────────── */
.hv3-user-name {
  font-size: 0.8125rem;
  color: var(--hv3-user-fg);
  transition: color 0.2s;
}

/* ── Mobile drawer ───────────────────────────────────────────── */
.edc-mobile-drawer {
  background: var(--hv3-drawer-bg) !important;
  border-color: var(--hv3-drawer-border) !important;
}

.edc-mobile-drawer-head {
  border-bottom-color: var(--hv3-drawer-border) !important;
}

.edc-mobile-drawer-head > span {
  color: var(--hv3-drawer-head-fg);
}

.edc-mobile-drawer-link {
  color: var(--hv3-drawer-link-fg) !important;
}

.edc-mobile-drawer-link:hover {
  background: var(--hv3-drawer-link-bg-hover) !important;
  color: var(--hv3-nav-fg-hover) !important;
}

.edc-mobile-drawer-link .edc-drawer-link-icon {
  color: var(--hv3-drawer-link-fg);
  opacity: 0.7;
}

.hv3-drawer-lang-fg {
  color: var(--hv3-lang-fg);
}

.hv3-drawer-lang-active {
  color: var(--hv3-lang-active-fg) !important;
}

/* Mobile-only sign-in button in drawer */
.hv3-drawer-sign-in {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.125rem;
  margin: 0.5rem 0.75rem;
  border-radius: 1rem;
  background: var(--hv3-sign-in-grad);
  color: var(--hv3-sign-in-fg) !important;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 12px rgba(34, 211, 238, 0.22);
}

html[data-theme="light"] .hv3-drawer-sign-in {
  box-shadow: 0 2px 12px rgba(8, 145, 178, 0.22);
}

/* ── "Featured" drawer item (Specialists Circle) ─────────────── */
.edc-mobile-drawer-link--featured {
  background: rgba(34, 211, 238, 0.06) !important;
  border: 1px solid rgba(34, 211, 238, 0.14) !important;
  border-radius: 0.875rem;
}

html[data-theme="light"] .edc-mobile-drawer-link--featured {
  background: rgba(8, 145, 178, 0.05) !important;
  border-color: rgba(8, 145, 178, 0.16) !important;
}

/* Consultation badge stays legible in both modes */
.hv3-badge-free {
  display: inline-flex;
  align-items: center;
  border-radius: 0.625rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 800;
  background: #34d399;
  color: #052e16;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
