/* Solstice ID-Photo Capture overlay — D-photo-id Phase 5 (2026-05-16).
 *
 * Scoped under .sip-overlay so it never leaks. Charcoal/amber palette
 * matches the rest of the Solstice PWA shell. Uses LS-lite-compatible
 * tokens where available but falls back to hardcoded values so the
 * module renders correctly even on shells that haven't booted the
 * Living System yet (e.g., the kiosk PIN screen). */

.sip-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
  background: rgba(18, 18, 18, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f5f5f5;
  font-family: var(--font-sans, system-ui, -apple-system, "Segoe UI", sans-serif);
  overflow: auto;
}

.sip-header {
  text-align: center;
  margin-bottom: 16px;
  flex: 0 0 auto;
}

.sip-title {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sip-subtitle {
  margin: 0;
  font-size: 14px;
  color: rgba(245, 245, 245, 0.72);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.45;
}

.sip-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  min-height: 320px;
  max-height: 70vh;
}

.sip-video,
.sip-preview {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #000;
}

/* The canvas is the off-screen capture buffer — never rendered. */
.sip-canvas {
  display: none;
}

.sip-status {
  margin: 14px auto 4px;
  text-align: center;
  font-size: 14px;
  min-height: 1.4em;
  color: rgba(245, 245, 245, 0.85);
}

.sip-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 12px 0 0;
  flex: 0 0 auto;
}

.sip-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 80ms ease, background 120ms ease, opacity 120ms ease;
  min-width: 140px;
  /* Touch targets ≥48px height for kiosk gloves */
  min-height: 48px;
}

.sip-btn:focus-visible {
  outline: 2px solid #ffb300;
  outline-offset: 2px;
}

.sip-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sip-btn-primary {
  background: #ffb300;          /* AITOPIA amber */
  color: #121212;
}

.sip-btn-primary:not(:disabled):hover {
  background: #ffc733;
  transform: translateY(-1px);
}

.sip-btn-primary:not(:disabled):active {
  transform: translateY(0);
}

.sip-btn-secondary {
  background: rgba(245, 245, 245, 0.08);
  color: #f5f5f5;
  border: 1px solid rgba(245, 245, 245, 0.18);
}

.sip-btn-secondary:not(:disabled):hover {
  background: rgba(245, 245, 245, 0.16);
}

/* Tighten the layout on tablet-portrait kiosks. */
@media (max-width: 900px) {
  .sip-overlay {
    padding: 16px;
  }
  .sip-title {
    font-size: 18px;
  }
  .sip-stage {
    min-height: 240px;
  }
  .sip-btn {
    padding: 12px 18px;
    font-size: 15px;
    min-width: 110px;
  }
}
