/* ============================================================
   CYBERBOOTH — Booth Page Styles
   ============================================================ */

/* ── Page Layout ──────────────────────────────────────────── */
.booth-page {
  min-height: 100dvh;
  padding-top: 70px;
  display: flex;
  flex-direction: column;
}

.booth-container {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
  padding: var(--space-xl);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── Camera Panel ─────────────────────────────────────────── */
.camera-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.camera-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 2px solid var(--neon-blue);
  box-shadow: var(--glow-blue);
  aspect-ratio: 4/3;
}

.camera-wrapper.recording {
  border-color: var(--hot-pink);
  box-shadow: var(--glow-pink);
  animation: neonPulse 1s ease-in-out infinite;
}

#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(-1); /* Mirror for front camera */
}

#camera-video.rear-camera {
  transform: scaleX(1);
}

/* ── Camera Overlay UI ────────────────────────────────────── */
.camera-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Corner brackets */
.camera-overlay::before,
.camera-overlay::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--neon-blue);
  border-style: solid;
  pointer-events: none;
}

.camera-overlay::before {
  top: 12px;
  left: 12px;
  border-width: 2px 0 0 2px;
  box-shadow: -4px -4px 8px rgba(0, 229, 255, 0.3);
}

.camera-overlay::after {
  bottom: 12px;
  right: 12px;
  border-width: 0 2px 2px 0;
  box-shadow: 4px 4px 8px rgba(0, 229, 255, 0.3);
}

.corner-br,
.corner-tl-extra {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--neon-blue);
  border-style: solid;
  pointer-events: none;
}

.corner-br {
  top: 12px;
  right: 12px;
  border-width: 2px 2px 0 0;
}

.corner-tl-extra {
  bottom: 12px;
  left: 12px;
  border-width: 0 0 2px 2px;
}

/* Status indicator */
.camera-status {
  position: absolute;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--neon-blue);
  pointer-events: none;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-blue);
  animation: pulseGlow 1.5s ease-in-out infinite;
}

.status-dot.active {
  background: #00FF88;
  box-shadow: 0 0 6px #00FF88;
}

.status-dot.recording {
  background: var(--hot-pink);
  box-shadow: 0 0 6px var(--hot-pink);
}

/* ── Countdown Overlay ────────────────────────────────────── */
.countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.countdown-overlay.visible {
  opacity: 1;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  color: var(--neon-blue);
  text-shadow:
    0 0 20px rgba(0, 229, 255, 1),
    0 0 50px rgba(0, 229, 255, 0.7),
    0 0 100px rgba(0, 229, 255, 0.4);
  animation: countdownPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  line-height: 1;
}

.countdown-number.go {
  color: #00FF88;
  text-shadow:
    0 0 20px rgba(0, 255, 136, 1),
    0 0 50px rgba(0, 255, 136, 0.7);
}

/* ── Flash Effect ─────────────────────────────────────────── */
.flash-overlay {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.05s ease;
}

.flash-overlay.active {
  opacity: 1;
}

/* ── Photo Counter ────────────────────────────────────────── */
.photo-counter {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  padding: 4px 16px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--neon-blue);
  letter-spacing: 0.1em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-counter.visible {
  opacity: 1;
}

/* ── Camera Controls ──────────────────────────────────────── */
.camera-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.countdown-selector {
  display: flex;
  gap: var(--space-xs);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
}

.countdown-chip {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--chrome-dim);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
}

.countdown-chip:hover {
  color: var(--neon-blue);
}

.countdown-chip.active {
  background: var(--neon-blue-dim);
  color: var(--neon-blue);
  border: 1px solid var(--neon-blue-mid);
  box-shadow: var(--glow-blue-sm);
}

.btn-flip {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  color: var(--chrome-silver);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
}

.btn-flip:hover {
  background: var(--neon-blue-dim);
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  transform: rotate(180deg);
}

.btn-capture {
  flex: 1;
  min-width: 160px;
}

.btn-capture .btn-icon {
  font-size: 1.1rem;
}

/* ── Permission Error ─────────────────────────────────────── */
.camera-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background: rgba(0,0,0,0.9);
  text-align: center;
  padding: var(--space-xl);
}

.camera-error .error-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.camera-error h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--hot-pink);
  letter-spacing: 0.1em;
}

.camera-error p {
  font-size: 0.85rem;
  color: var(--chrome-dim);
  max-width: 240px;
  line-height: 1.6;
}

/* ── Strip Panel (Right Sidebar) ──────────────────────────── */
.strip-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.strip-panel-header {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--chrome-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.strip-panel-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.strip-slots {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.strip-slot {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--border-subtle);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast);
}

.strip-slot.filled {
  border-style: solid;
  border-color: var(--border-glow);
}

.strip-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip-slot-number {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--border-subtle);
  letter-spacing: 0.1em;
}

.strip-slot-number.active {
  color: var(--neon-blue);
  animation: pulseGlow 1s ease-in-out infinite;
}

.strip-slot-badge {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00FF88;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 8px #00FF88;
}

/* ── Strip Actions ────────────────────────────────────────── */
.strip-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: auto;
}

/* ── No Camera Placeholder ────────────────────────────────── */
.no-camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  height: 100%;
  text-align: center;
  padding: var(--space-xl);
}

.placeholder-icon {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .booth-container {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

  .strip-slots {
    flex-direction: row;
  }

  .strip-slot {
    flex: 1;
    aspect-ratio: 4/3;
  }

  .strip-panel-header { display: none; }
}

@media (max-width: 480px) {
  .booth-container { padding: var(--space-sm); }

  .camera-controls {
    gap: var(--space-sm);
  }

  .countdown-selector {
    order: -1;
    width: 100%;
    justify-content: center;
  }
}
