/* Greek ID Verification — Camera Capture */

.camera-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  height: 100vh;
  height: 100dvh;
}
.camera-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
}

.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0,0,0,0.6);
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
}
.camera-title { color: white; font-size: 0.9rem; font-weight: 600; }
.camera-close-btn, .camera-switch-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.15);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.camera-viewfinder {
  flex: 1; min-height: 0; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.camera-video { width: 100%; height: 100%; object-fit: cover; }

.camera-mask {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}

.camera-guide-rect {
  width: 85%; max-width: 400px; aspect-ratio: 1.586;
  border: 3px solid rgba(255,255,255,0.8);
  border-radius: 12px; position: relative;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
}
.camera-guide-oval {
  width: 60%; max-width: 250px; aspect-ratio: 0.75;
  border: 3px solid rgba(255,255,255,0.8);
  border-radius: 50%; position: relative;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
}

.guide-corner {
  position: absolute; width: 24px; height: 24px;
  border-color: var(--accent); border-style: solid; border-width: 0;
}
.guide-corner.tl { top: -2px; left: -2px; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 8px; }
.guide-corner.tr { top: -2px; right: -2px; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 8px; }
.guide-corner.bl { bottom: -2px; left: -2px; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 8px; }
.guide-corner.br { bottom: -2px; right: -2px; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 8px; }

.camera-guide-text {
  position: absolute; bottom: 15%; left: 0; right: 0;
  text-align: center; color: white; font-size: 0.85rem;
  font-weight: 500; text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.camera-quality-bar {
  display: flex; justify-content: center; gap: 24px;
  padding: 12px; background: rgba(0,0,0,0.7); flex-shrink: 0;
}
.quality-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; color: rgba(255,255,255,0.7);
}
.qi-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #666; transition: background 0.3s;
}
.qi-dot.good { background: #22c55e; }
.qi-dot.ok { background: #f59e0b; }
.qi-dot.bad { background: #ef4444; }

.camera-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px; padding-bottom: max(20px, env(safe-area-inset-bottom));
  background: rgba(0,0,0,0.8); flex-shrink: 0;
}
.camera-capture-btn {
  width: 72px; height: 72px; border-radius: 50%;
  border: none; background: transparent; cursor: pointer; padding: 0;
}
.capture-ring {
  width: 72px; height: 72px; border-radius: 50%;
  border: 4px solid white; display: flex;
  align-items: center; justify-content: center;
  transition: transform 0.1s;
}
.capture-ring:active { transform: scale(0.92); }
.capture-inner { width: 56px; height: 56px; border-radius: 50%; background: white; }

.camera-flash-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: white;
}

.camera-flash-effect {
  position: fixed; inset: 0; background: white;
  z-index: 1001; animation: flash-anim 0.3s ease-out forwards;
}
@keyframes flash-anim { 0% { opacity: 0.8; } 100% { opacity: 0; } }

.camera-review {
  position: fixed; inset: 0; background: #000;
  display: flex; flex-direction: column; z-index: 1001;
  height: 100vh; height: 100dvh; overflow: hidden;
}
.review-header { padding: 12px 16px; text-align: center; flex-shrink: 0; }
.review-image-wrap {
  flex: 1; min-height: 0; display: flex; align-items: center;
  justify-content: center; padding: 8px 16px; overflow: hidden;
}
.review-image {
  max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.review-info {
  text-align: center; color: rgba(255,255,255,0.5);
  font-size: 0.72rem; font-family: 'Geist Mono', monospace; padding: 4px; flex-shrink: 0;
}
.review-actions {
  display: flex; gap: 12px; padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom)); flex-shrink: 0;
}
.review-actions .tb { color: white; border-color: rgba(255,255,255,0.3); }

.camera-error {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px; text-align: center;
}
.camera-error p { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; }

@media (min-width: 769px) {
  .camera-overlay { background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; }
  .camera-container { max-width: 500px; max-height: 90vh; border-radius: 16px; overflow: hidden; }
}
