/* Notification Hub — Spectator Styles */

/* ── Header ─────────────────────────────────────────────────────── */
.nhub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.nhub-agent-select {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nhub-agent-select label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary, #6b7280);
}

.nhub-agent-select select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #d1d5db);
  background: var(--bg-secondary, #f9fafb);
  color: var(--text-primary, #111827);
  font-size: 14px;
  cursor: pointer;
}

.nhub-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nhub-toggle {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border, #d1d5db);
  background: transparent;
  color: var(--text-secondary, #6b7280);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.nhub-toggle.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.nhub-btn-small {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #d1d5db);
  background: var(--bg-secondary, #f9fafb);
  color: var(--text-secondary, #6b7280);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.nhub-btn-small:hover {
  background: var(--bg-hover, #e5e7eb);
}

/* ── Stats Bar ──────────────────────────────────────────────────── */
.nhub-stats-bar {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-secondary, #f3f4f6);
  border-radius: 12px;
  margin: 8px 0;
  overflow-x: auto;
}

.nhub-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.nhub-stat-value {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary, #111827);
}

.nhub-stat-label {
  font-size: 11px;
  color: var(--text-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nhub-stat-unread .nhub-stat-value {
  color: #3b82f6;
}

/* ── Category Chips ─────────────────────────────────────────────── */
.nhub-category-chips {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nhub-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border, #d1d5db);
  background: transparent;
  color: var(--text-secondary, #6b7280);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.nhub-chip:hover {
  border-color: var(--chip-color, #3b82f6);
  color: var(--chip-color, #3b82f6);
}

.nhub-chip.active {
  background: var(--chip-color, #3b82f6);
  color: white;
  border-color: var(--chip-color, #3b82f6);
}

/* ── Notification List ──────────────────────────────────────────── */
.nhub-notification-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
  max-height: 500px;
  overflow-y: auto;
}

.nhub-notification {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  transition: all 0.2s;
  position: relative;
}

.nhub-notification:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nhub-notification.unread {
  border-left: 3px solid #3b82f6;
  background: var(--bg-unread, #eff6ff);
}

.nhub-notification[data-priority="urgent"] {
  border-left-color: #dc2626;
}

.nhub-notification[data-priority="urgent"].unread {
  background: #fef2f2;
}

.nhub-notification[data-priority="high"].unread {
  border-left-color: #f59e0b;
}

/* ── Notification Parts ─────────────────────────────────────────── */
.nhub-notif-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.nhub-notif-body {
  flex: 1;
  min-width: 0;
}

.nhub-notif-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.nhub-notif-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #111827);
}

.nhub-notif-priority {
  font-size: 12px;
}

.nhub-notif-message {
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 4px;
  line-height: 1.4;
}

.nhub-notif-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
}

.nhub-notif-category {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nhub-notif-time {
  color: var(--text-tertiary, #9ca3af);
}

.nhub-notif-tick {
  color: var(--text-tertiary, #9ca3af);
}

.nhub-notif-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.nhub-notification:hover .nhub-notif-dismiss {
  opacity: 1;
}

/* ── Empty State ────────────────────────────────────────────────── */
.nhub-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary, #6b7280);
  font-size: 14px;
}

/* ── Dark Mode ──────────────────────────────────────────────────── */
.dark .nhub-agent-select select {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}

.dark .nhub-stats-bar {
  background: #1f2937;
}

.dark .nhub-stat-value {
  color: #f9fafb;
}

.dark .nhub-notification {
  background: #1f2937;
  border-color: #374151;
}

.dark .nhub-notification.unread {
  background: #1e293b;
}

.dark .nhub-notification[data-priority="urgent"].unread {
  background: #1c1917;
}

.dark .nhub-notif-title {
  color: #f9fafb;
}

.dark .nhub-notif-message {
  color: #9ca3af;
}

.dark .nhub-btn-small {
  background: #1f2937;
  border-color: #374151;
  color: #9ca3af;
}

.dark .nhub-btn-small:hover {
  background: #374151;
}

.dark .nhub-chip {
  border-color: #374151;
  color: #9ca3af;
}

.dark .nhub-toggle {
  border-color: #374151;
  color: #9ca3af;
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nhub-header {
    flex-direction: column;
    align-items: stretch;
  }

  .nhub-controls {
    justify-content: flex-end;
  }

  .nhub-stats-bar {
    gap: 12px;
    padding: 10px 12px;
  }

  .nhub-stat-value {
    font-size: 16px;
  }

  .nhub-notification {
    padding: 10px 12px;
  }

  .nhub-notif-dismiss {
    opacity: 1;
  }

  .nhub-category-chips {
    padding: 4px 0;
  }
}
