/* Social Radar v2 — Header */

/* === Single Header Bar === */
.header-bar {
  background: var(--color-navbar);
  color: var(--color-text);
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-center {
  flex: 55;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.header-right {
  flex: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-left: 1px solid #333;
  padding-left: 16px;
}

.header-right-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.navbar-brand:hover {
  text-decoration: none;
  color: var(--color-accent-text);
}

.brand-logo {
  height: 48px;
  width: auto;
  vertical-align: middle;
  margin-right: 2px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: filter 0.15s;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.navbar-nav a {
  color: var(--color-text-secondary);
  font-size: 1rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

/* === Health Dot (Navbar) === */
.health-dot {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.health-dot-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text-secondary);
  transition: background 0.3s, box-shadow 0.3s;
}

.health-dot.status-healthy .health-dot-indicator {
  background: var(--color-ok-green);
  box-shadow: 0 0 8px var(--color-ok-green), 0 0 16px rgba(74, 153, 104, 0.3);
}

.health-dot.status-degraded .health-dot-indicator {
  background: #FFD93D;
  box-shadow: 0 0 8px #FFD93D, 0 0 20px rgba(255, 217, 61, 0.35);
  animation: healthPulse 2s ease infinite;
}

.health-dot.status-error .health-dot-indicator {
  background: #FF6B6B;
  box-shadow: 0 0 8px #FF6B6B, 0 0 20px rgba(255, 107, 107, 0.35);
  animation: healthPulse 1.5s ease infinite;
}

@keyframes healthPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.health-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 31, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 200px;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 200;
  font-size: 0.8rem;
  color: var(--color-text);
  line-height: 1.8;
}

.health-dot:hover .health-tooltip {
  display: block;
}

.health-tooltip-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.health-tooltip-row {
  color: var(--color-text-secondary);
}

/* === Secondary Page Header (no search/filters/spotlight) === */
.header-bar-secondary .header-center {
  display: none;
}

.header-bar-secondary .header-right {
  flex: unset;
  border-left: none;
  padding-left: 0;
}

/* Search */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

.search-box input {
  width: 20vw;
  min-width: 160px;
  max-width: 280px;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.search-box input::placeholder {
  color: var(--color-text-secondary);
}

.search-box input:focus {
  border-color: var(--color-signal);
  background: rgba(255, 255, 255, 0.14);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius) var(--radius);
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow-md);
}

.search-suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-text);
  transition: background 0.1s;
}

.search-suggestion-item:hover {
  background: var(--color-surface-hover);
}

/* Spotlight Chips */
.spotlight-chips {
  display: flex;
  gap: 6px;
  align-items: center;
}

.spotlight-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.spotlight-chip:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text);
}

.spotlight-chip[data-type="core"].active {
  border-color: var(--color-tier-core);
  background: rgba(138, 43, 226, 0.2);
  color: var(--color-tier-core);
}

.spotlight-chip[data-type="regular"].active {
  border-color: var(--color-tier-regular);
  background: rgba(30, 64, 175, 0.2);
  color: var(--color-tier-regular);
}

.spotlight-chip[data-type="emerging"].active {
  border-color: var(--color-tier-emerging);
  background: rgba(0, 255, 255, 0.15);
  color: var(--color-tier-emerging);
}

.spotlight-chip.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Chip line indicators (legend) */
.chip-line {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.chip-line-core { background: var(--color-tier-core); }
.chip-line-regular { background: var(--color-tier-regular); opacity: 0.75; }
.chip-line-emerging { background: var(--color-tier-emerging); opacity: 0.5; }


/* Category Capsule Buttons (underline-accent style) */
.capsule-group {
  display: flex;
  gap: 2px;
  align-items: center;
  overflow-x: auto;
}

.capsule-btn {
  padding: 6px 10px;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #999;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, font-weight 0.15s;
  white-space: nowrap;
  outline: none;
}

.capsule-all {
  font-weight: 600;
}

.capsule-all.active {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
  font-weight: 700;
}

.capsule-btn:hover {
  color: #ccc;
}

.capsule-btn.active {
  color: var(--capsule-color, var(--color-text));
  border-bottom-color: var(--capsule-color, var(--color-text));
  font-weight: 600;
}

/* ============================================================
   Phase 3C: Help Button
   ============================================================ */

/* Help button in header */
.help-btn-header {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.help-btn-header:hover {
  background: var(--color-accent);
  color: var(--color-text);
  border-color: var(--color-accent);
}

/* ============================================================
   Search Suggestion Type Badges (search.js)
   ============================================================ */
.suggestion-type {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  margin-right: 6px;
  white-space: nowrap;
}

.suggestion-type-issue {
  background: rgba(138, 43, 226, 0.15);
  color: var(--color-tier-core);
}

.suggestion-type-keyword {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

/* ============================================================
   Mobile-only elements (hidden on desktop)
   ============================================================ */
.hamburger-btn,
.search-toggle-btn,
.search-close-btn {
  display: none;
}

.hamburger-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.hamburger-btn:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.search-toggle-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-close-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--color-border);
  color: var(--color-text);
  font-size: 0.9rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
}


/* Drawer drag handle (mobile bottom sheet) */
.drawer-drag-handle {
  display: none;
}

.drawer-drag-handle span {
  display: block;
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin: 0 auto;
}
