/* ===========================================================================
   Guided Face ID setup wizard.

   Reuses the app's existing modal shell (.modal-overlay / .modal / .modal-body)
   so it looks like every other dialog; only the wizard-specific parts are here.
   =========================================================================== */

.faceid-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ojt-2);
  margin-bottom: var(--ojt-4);
}

.faceid-step {
  display: inline-flex;
  align-items: center;
  gap: var(--ojt-2);
  font-size: var(--ojt-fs-sm);
  color: var(--ojt-text-subtle);
  white-space: nowrap;
}

.faceid-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--ojt-border-strong);
  font-size: var(--ojt-fs-xs);
  font-variant-numeric: tabular-nums;
}

.faceid-step.is-current { color: var(--ojt-text); font-weight: var(--ojt-fw-bold); }
.faceid-step.is-current .faceid-step-n {
  border-color: var(--ojt-primary);
  background: var(--ojt-primary);
  color: var(--ojt-on-primary);
}

.faceid-step.is-done { color: var(--ojt-success); }
.faceid-step.is-done .faceid-step-n {
  border-color: var(--ojt-success);
  background: var(--ojt-success);
  color: var(--ojt-on-primary);
}

.faceid-step-sep {
  width: 1rem;
  height: 1px;
  background: var(--ojt-border-strong);
}

.faceid-list {
  margin: 0 0 var(--ojt-3);
  padding-left: 0;
  list-style: none;
  color: var(--ojt-text-muted);
}

.faceid-list li { padding: var(--ojt-1) 0; }

/* The camera pane keeps a fixed aspect so the dialog does not jump as the
   stream starts, and the hint sits over it until a frame arrives. */
.faceid-camera {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 42vh;
  background: var(--ojt-surface-alt);
  border: 1px solid var(--ojt-border-strong);
  border-radius: var(--ojt-radius);
  overflow: hidden;
  margin-bottom: var(--ojt-3);
}

.faceid-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);   /* a selfie preview should read like a mirror */
}

.faceid-camera-hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--ojt-2) var(--ojt-3);
  background: var(--ojt-overlay-strong);
  color: var(--ojt-on-primary);
  font-size: var(--ojt-fs-sm);
}

.faceid-samples {
  display: flex;
  gap: var(--ojt-2);
  flex-wrap: wrap;
  margin-bottom: var(--ojt-3);
}

.faceid-sample {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--ojt-radius);
  overflow: hidden;
  border: 1px solid var(--ojt-border-strong);
}

.faceid-sample img { width: 100%; height: 100%; object-fit: cover; }

.faceid-sample-n {
  position: absolute;
  right: 2px;
  bottom: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--ojt-primary);
  color: var(--ojt-on-primary);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.faceid-status {
  display: flex;
  align-items: flex-start;
  gap: var(--ojt-2);
  padding: var(--ojt-3);
  border-radius: var(--ojt-radius);
  background: var(--ojt-surface-alt);
  border: 1px solid var(--ojt-border);
  color: var(--ojt-text);
  font-size: var(--ojt-fs-sm);
}

.faceid-status.is-success { background: var(--ojt-success-bg); border-color: var(--ojt-success-border); color: var(--ojt-success); }
.faceid-status.is-warning { background: var(--ojt-warning-bg); border-color: var(--ojt-warning-border); color: var(--ojt-warning); }
.faceid-status.is-error   { background: var(--ojt-danger-bg);  border-color: var(--ojt-danger-border);  color: var(--ojt-danger); }

.faceid-consent {
  margin: var(--ojt-3) 0 0;
  padding: var(--ojt-3);
  border-left: 3px solid var(--ojt-primary);
  background: var(--ojt-surface-alt);
  border-radius: var(--ojt-radius-sm);
  color: var(--ojt-text-muted);
  font-size: var(--ojt-fs-sm);
}

@media (max-width: 575px) {
  .faceid-step { font-size: var(--ojt-fs-xs); }
  .faceid-step-sep { width: .5rem; }
  .faceid-camera { max-height: 34vh; }
}
