/* Camera modal layout */
.camera-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Ensure selectors match updated markup */
.camera-content {
  position: relative;
  width: 90vw;
  max-width: 520px;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

/* Video stream */
#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Guide frame at ID ratio; JS sets width/height exactly */
.guide-frame {
  position: absolute;
  border: 2px dashed rgba(255,255,255,0.9);
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4) inset;
  pointer-events: none;
}

/* Actions: pin to viewport so they’re always visible */
.camera-actions {
  position: fixed;                /* was: absolute */
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  justify-content: center;
  z-index: 2001;                  /* above modal/video/overlay */
  background: rgba(0,0,0,0.55);
  padding: 10px 14px;
  border-radius: 16px;
  backdrop-filter: blur(4px);
}

.camera-btn {
  background-color: #4c84fc;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

/* Mobile: keep within viewport and still visible */
@media (max-width: 480px) {
  .camera-content { max-width: 95vw; }
  .camera-actions {
    bottom: 12px;
    gap: 10px;
    padding: 8px 12px;
  }
  .camera-btn { padding: 8px 14px; font-size: 13px; }
}