/* === Live Feed Popup (Chat-box style) === */
.popup {
  position: fixed;
  bottom: 56px;
  right: 16px;
  z-index: 999;
  width: 400px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
}

/* Center position (galaxy map) */
.center {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

/* Toggle button - always visible */
.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--nebula-blue), var(--deep-void));
  border: 1px solid var(--hull-grey);
  color: var(--star-white);
  cursor: pointer;
  font-family: var(--font-orbitron), 'Orbitron', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.toggle:hover {
  border-color: var(--plasma-cyan);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

/* When open, toggle becomes bottom edge of the panel */
.open .toggle {
  border-radius: 0 0 8px 8px;
  border-top-color: var(--hull-grey);
  background: linear-gradient(180deg, var(--deep-void), rgba(26, 39, 68, 0.8));
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--bio-green);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--bio-green);
  animation: dotPulse 2s infinite;
}

.label {
  flex: 1;
  text-align: left;
}

.icon {
  font-size: 0.65rem;
  color: var(--chrome-silver);
  transition: color 0.2s;
}

.toggle:hover .icon {
  color: var(--plasma-cyan);
}

.status {
  font-family: var(--font-jetbrains), 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--chrome-silver);
}

.statusConnected {
  color: var(--bio-green);
}

/* Panel - the live feed container */
.panel {
  height: 420px;
  max-height: calc(100vh - 180px);
  border: 1px solid var(--plasma-cyan);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  box-shadow:
    0 -4px 20px rgba(0, 212, 255, 0.08),
    0 0 40px rgba(0, 0, 0, 0.4);
  animation: panelSlideUp 0.25s ease-out;
}

@keyframes panelSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Mobile: full width, 40% of normal height */
@media (max-width: 640px) {
  .popup {
    right: 0;
    left: 0;
    bottom: 72px;
    width: 100%;
    max-width: 100%;
    transform: none;
  }

  .toggle {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .open .toggle {
    border-radius: 0;
  }

  .panel {
    height: 168px;
    max-height: 168px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* Small mobile: shorter panel */
@media (max-width: 400px) {
  .panel {
    height: 140px;
    max-height: 140px;
  }
}
