/* ============================================================
   components.css — UI component styles
   ============================================================ */

/* ════════════════════════════════════════
   NAV PILLS
   ════════════════════════════════════════ */
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.nav-pill:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.nav-pill.active {
  color: var(--accent-blue);
  background: rgba(82, 120, 255, 0.1);
  border-color: rgba(82, 120, 255, 0.35);
}

/* ════════════════════════════════════════
   COMMAND BAR
   ════════════════════════════════════════ */
.command-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.command-bar__orb-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.command-bar__orb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.command-bar__orb-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(82, 120, 255, 0.5);
  animation: pulse-ring 2s ease-in-out infinite;
}

.command-bar__input {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: transparent;
}

.command-bar__input::placeholder {
  color: var(--text-hint);
}

.command-bar__shortcut {
  font-size: 0.7rem;
  color: var(--text-hint);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: var(--font-display);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ════════════════════════════════════════
   QUICK-ACTION CHIPS
   ════════════════════════════════════════ */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  white-space: nowrap;
}

.quick-chip:hover {
  color: var(--text-primary);
}

/* ════════════════════════════════════════
   MINI STATUS PANELS
   ════════════════════════════════════════ */
.mini-panels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.mini-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
}

.mini-panel__icon {
  font-size: 1.1rem;
  margin-bottom: 6px;
  line-height: 1;
}

.mini-panel__value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-panel__sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ════════════════════════════════════════
   NEWS FEED GRID
   ════════════════════════════════════════ */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
}

.news-card__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.news-card__tag--tech {
  background: rgba(82, 120, 255, 0.15);
  color: #7B9FFF;
}

.news-card__tag--business {
  background: rgba(245, 158, 11, 0.15);
  color: #F5A623;
}

.news-card__tag--science {
  background: rgba(20, 184, 166, 0.15);
  color: #2DD4BF;
}

.news-card__tag--world {
  background: rgba(155, 89, 245, 0.15);
  color: #B07EF8;
}

.news-card__headline {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.news-card__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ════════════════════════════════════════
   VIDEO ROW
   ════════════════════════════════════════ */
.video-row-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.video-row-label__see-all {
  font-size: 0.72rem;
  color: var(--accent-blue);
  cursor: pointer;
}

.video-row-label__see-all:hover {
  color: var(--accent-blue-hover);
}

.video-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.video-scroll::-webkit-scrollbar {
  display: none;
}

.video-card {
  flex-shrink: 0;
  width: 160px;
  cursor: pointer;
}

.video-card__thumb {
  width: 160px;
  height: 90px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
}

.video-card__thumb-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.video-card:hover .video-card__play {
  opacity: 1;
}

.video-card__play-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #080B14;
  padding-left: 2px;
}

.video-card__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card__meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ════════════════════════════════════════
   SIDEBAR — AI PANEL
   ════════════════════════════════════════ */
.sidebar-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}

.sidebar-section__header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.sidebar-section__title {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.ai-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-blue);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

.ai-response {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
  min-height: 40px;
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: none;
}

.ai-response::-webkit-scrollbar {
  display: none;
}

.ai-response.active {
  color: var(--text-primary);
  font-style: normal;
}

.ai-cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--accent-blue);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

.ai-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.ai-source-chip {
  font-size: 0.68rem;
  color: var(--accent-blue);
  background: rgba(82, 120, 255, 0.1);
  border: 1px solid rgba(82, 120, 255, 0.25);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ai-source-chip:hover {
  background: rgba(82, 120, 255, 0.2);
}

/* ════════════════════════════════════════
   SIDEBAR — WEATHER WIDGET
   ════════════════════════════════════════ */
.weather-widget {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.weather-widget__icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.weather-widget__main {
  flex: 1;
}

.weather-widget__temp {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 2px;
}

.weather-widget__city {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.weather-widget__details {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.weather-detail {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.weather-detail strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ════════════════════════════════════════
   SIDEBAR — MINI MAP
   ════════════════════════════════════════ */
.mini-map {
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background-color: #0A1020;
  background-image:
    linear-gradient(rgba(82, 120, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 120, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

.mini-map__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(8, 11, 20, 0.6) 100%);
}

.mini-map__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-map__pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-blue);
  position: relative;
  z-index: 2;
  box-shadow: 0 0 8px rgba(82, 120, 255, 0.8);
}

.mini-map__pin-ring {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(82, 120, 255, 0.6);
  animation: map-ping 2s ease-out infinite;
}

.mini-map__label {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(8, 11, 20, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ════════════════════════════════════════
   SIDEBAR — EMAIL TRAY
   ════════════════════════════════════════ */
.email-tray {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
}

.email-row__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: #fff;
  flex-shrink: 0;
}

.email-row__body {
  flex: 1;
  min-width: 0;
}

.email-row__sender {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-row__subject {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-row__unread {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
  flex-shrink: 0;
}

/* ════════════════════════════════════════
   PANEL OVERLAY CARD INTERNALS
   ════════════════════════════════════════ */
.panel-card__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  line-height: 1;
}

.panel-card__close:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

/* ── Auth buttons (shown when no session) ── */
.topnav__login,
.topnav__signup {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-display);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.topnav__login {
  color: var(--accent-blue);
  border: 1px solid rgba(82, 120, 255, 0.35);
}

.topnav__login:hover {
  background: rgba(82, 120, 255, 0.1);
}

.topnav__signup {
  color: #fff;
  background: var(--accent-blue);
  border: 1px solid transparent;
}

.topnav__signup:hover {
  background: var(--accent-blue-hover);
}

.panel-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  padding-right: 32px;
}

.panel-card__domain {
  font-size: 0.72rem;
  color: var(--accent-blue);
  margin-bottom: 14px;
}

.panel-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.panel-card__iframe {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  display: block;
  background: rgba(255, 255, 255, 0.03);
}

.panel-card__actions {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  border: 1px solid transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-blue-hover);
}

.btn--ghost {
  background: var(--bg-surface);
  color: var(--text-muted);
  border-color: var(--border-default);
}

.btn--ghost:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
