/* CCTV Monitoring Console - Theme & Component Styles */

:root {
  --bg-main: #0b0f19;
  --bg-card: #111827;
  --bg-card-hover: #1f2937;
  --border-subtle: #1e293b;
  --border-active: #334155;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Card Panels */
.cctv-panel {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cctv-panel:hover {
  border-color: var(--border-active);
}

/* Video Stage */
.video-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #030712;
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-frame {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
}

/* Status Indicator Dot */
.status-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  display: inline-block;
}

.status-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.status-dot.reconnecting {
  background-color: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

.status-dot.offline {
  background-color: #f43f5e;
  box-shadow: 0 0 10px #f43f5e;
}

/* Pulsing Badge Animation */
@keyframes cctvPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.live-indicator {
  animation: cctvPulse 2s infinite ease-in-out;
}

/* Shutter Flash Effect */
@keyframes shutterFlash {
  0% { opacity: 0; }
  20% { opacity: 0.9; }
  100% { opacity: 0; }
}

.shutter-flash-overlay {
  position: absolute;
  inset: 0;
  background: white;
  pointer-events: none;
  opacity: 0;
  z-index: 50;
}

.shutter-flash-overlay.flashing {
  animation: shutterFlash 0.4s ease-out;
}

/* Range Slider Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 0.4rem;
  border-radius: 0.25rem;
  background: #374151;
  outline: none;
  transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #06b6d4;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.7);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #38bdf8;
}

input[type="range"]::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #06b6d4;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.7);
}

/* Toast Notification */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
  pointer-events: none;
}

.cctv-toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  transform: translateY(1rem);
  opacity: 0;
  transition: all 0.25s ease-out;
}

.cctv-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Telemetry Mini Progress Bar */
.telemetry-progress-bg {
  background-color: #1f2937;
  border-radius: 9999px;
  overflow: hidden;
  height: 0.5rem;
}

.telemetry-progress-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease, background-color 0.4s ease;
}
