/* =============================================================================
   CAMERA, GPS LOCKING & WATERMARK ENGINE STYLES
   Client-Side Compression & Canvas Stamping Visuals
   ============================================================================= */

.camera-modal-content {
  position: relative;
  background: #000;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.camera-viewfinder-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  max-height: 480px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#camera-video-stream, #captured-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Viewfinder HUD Overlays */
.viewfinder-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.5) 100%);
}

.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.gps-lock-badge {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--primary-500);
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #fff;
  font-family: var(--font-mono);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.gps-lock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-400);
  box-shadow: 0 0 8px var(--primary-400);
  animation: gpsPulse 1.5s infinite;
}

.gps-lock-badge.searching .gps-lock-dot {
  background: var(--color-due-soon);
  box-shadow: 0 0 8px var(--color-due-soon);
}

@keyframes gpsPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.compression-badge {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--primary-300);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Center Crosshair Target */
.hud-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-crosshair::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
}

.hud-crosshair::after {
  content: '';
  position: absolute;
  height: 16px;
  width: 2px;
  background: rgba(255, 255, 255, 0.8);
}

/* Live Stamping Watermark Preview Overlay */
.hud-watermark-overlay {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--primary-600);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.72rem;
  color: #fff;
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.hud-watermark-overlay .wm-title {
  color: var(--primary-400);
  font-weight: 700;
  font-size: 0.78rem;
}

/* Camera Controls Bar */
.camera-controls-panel {
  width: 100%;
  background: #0f172a;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-camera-flip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-camera-flip:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Shutter Trigger Button */
.btn-shutter-trigger {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
  border: 5px solid rgba(16, 185, 129, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  transition: var(--transition);
}

.btn-shutter-trigger .shutter-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-600);
  transition: var(--transition);
}

.btn-shutter-trigger:active .shutter-inner {
  transform: scale(0.85);
  background: var(--primary-400);
}

/* Image Watermark Stamp Canvas (Hidden by default) */
#watermark-canvas {
  display: none;
}

/* Compression & Size Audit Info Card */
.compression-audit-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--primary-700);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compression-audit-box .audit-metric {
  font-size: 0.82rem;
  color: var(--slate-300);
}

.compression-audit-box .audit-metric strong {
  color: var(--primary-300);
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------------------------
   Capture-blocked state
   The shutter is disabled until a live camera feed AND a real GPS fix exist.
   There is no simulated-photo fallback, so this state must be visible.
   --------------------------------------------------------------------------- */

.camera-error-banner {
  margin: 10px 14px 0;
  padding: 11px 14px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 0.84rem;
  line-height: 1.45;
}

.camera-error-banner.fatal {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.7);
  color: #fecaca;
  font-weight: 600;
}

/* The shutter is a div, so `disabled` alone does nothing - block the pointer. */
.btn-shutter-trigger.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(1);
}

.btn-shutter-trigger.disabled .shutter-inner {
  background: #64748b;
}
