/* ═══════════════════════════════════════════════════
   BankAI — KYC Verification Styles (Fey Terminal Theme)
   ═══════════════════════════════════════════════════ */

/* ── App Container ── */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 auto;
  padding: 40px 18px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Header ── */
.app-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-heading-lg);
}
.logo-icon {
  font-size: 28px;
  filter: grayscale(1) brightness(1.5);
}
.logo-text {
  color: var(--color-fey-white);
}
.logo-accent {
  color: var(--color-fey-ember); /* Amber orange accent for the logo */
}

.header-subtitle {
  margin-top: 6px;
  font-size: 10px;
  color: var(--color-fey-graphite);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: var(--font-weight-semibold);
}

/* ── Stepper Navigation (Fey Pill Navigation Theme) ── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  background: var(--surface-elevated);
  border: 1px solid var(--color-fey-smoke);
  border-radius: var(--radius-full);
  padding: 6px 12px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.step-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--color-fey-smoke);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-canvas);
  transition: var(--transition);
  position: relative;
}

.step-number {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  color: var(--color-fey-graphite);
  transition: var(--transition);
}

.step-check {
  position: absolute;
  width: 10px;
  height: 10px;
  fill: none;
  stroke: var(--surface-canvas);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.step-label {
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--color-fey-graphite);
  letter-spacing: -0.01em;
  transition: var(--transition);
}

/* Active state: Pill glows with Fey Signal border */
.step-item.active {
  background: rgba(255, 255, 255, 0.03);
}
.step-item.active .step-circle {
  border-color: var(--color-fey-signal);
}
.step-item.active .step-number {
  color: var(--color-fey-signal);
}
.step-item.active .step-label {
  color: var(--color-fey-white);
}

/* Completed state: Green highlight */
.step-item.completed .step-circle {
  border-color: var(--color-fey-growth);
  background: var(--color-fey-growth);
}
.step-item.completed .step-number {
  opacity: 0;
  transform: scale(0);
}
.step-item.completed .step-check {
  opacity: 1;
  transform: scale(1);
}
.step-item.completed .step-label {
  color: var(--color-fey-growth);
}

/* Stepper connectors are hidden or minimal in our compact stepper pill design */
.step-connector {
  flex-grow: 1;
  height: 1px;
  background: var(--color-fey-smoke);
  margin: 0 4px;
  opacity: 0.5;
}
.connector-fill {
  width: 0%;
  height: 100%;
  background: var(--color-fey-growth);
  transition: width 0.6s ease;
}

/* ── Panel Cards (Fey elevated showcase style) ── */
.kyc-panel {
  display: none;
  animation: panelIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.kyc-panel.active {
  display: block;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.glass-card {
  background: var(--surface-card);
  border: 1px solid var(--color-fey-smoke);
  border-radius: var(--radius-cards);
  padding: 32px 24px;
  box-shadow: var(--shadow-xl); /* Heavy black floating halo */
  position: relative;
}

.panel-title {
  font-size: var(--text-heading);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-heading);
  margin-bottom: 8px;
}

.panel-desc {
  font-size: 13px;
  color: var(--color-fey-graphite);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* ── Camera Viewports (16px radii, floating) ── */
.camera-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-cards);
  overflow: hidden;
  background: var(--color-fey-abyss);
  margin-bottom: 20px;
  border: 1px solid var(--color-fey-smoke);
}

.camera-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Corner scan brackets */
.scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scan-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--color-fey-signal);
  border-style: solid;
  border-width: 0;
}
.scan-corner.tl { top: 20px; left: 20px; border-top-width: 2.5px; border-left-width: 2.5px; border-radius: 4px 0 0 0; }
.scan-corner.tr { top: 20px; right: 20px; border-top-width: 2.5px; border-right-width: 2.5px; border-radius: 0 4px 0 0; }
.scan-corner.bl { bottom: 20px; left: 20px; border-bottom-width: 2.5px; border-left-width: 2.5px; border-radius: 0 0 0 4px; }
.scan-corner.br { bottom: 20px; right: 20px; border-bottom-width: 2.5px; border-right-width: 2.5px; border-radius: 0 0 4px 0; }

/* Sweeping scan line */
.scan-line {
  position: absolute;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-fey-signal), transparent);
  box-shadow: 0 0 8px var(--color-fey-signal);
  animation: scanSweep 2.5s ease-in-out infinite;
}

@keyframes scanSweep {
  0%   { top: 20px; opacity: 0.4; }
  50%  { top: calc(100% - 20px); opacity: 0.9; }
  100% { top: 20px; opacity: 0.4; }
}

/* Countdown overlay */
.capture-countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 5;
}
.countdown-num {
  font-size: 54px;
  font-weight: var(--font-weight-bold);
  color: var(--color-fey-ember);
  text-shadow: 0 0 20px rgba(255, 161, 108, 0.4);
  animation: countPulse 1s ease-in-out infinite;
  letter-spacing: -0.05em;
}

@keyframes countPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

/* Selfie face overlay */
.selfie-viewport {
  aspect-ratio: 3 / 4;
}

.face-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.face-circle {
  width: 190px;
  height: 250px;
  border: 1px dashed var(--color-fey-signal);
  border-radius: 50%;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.6);
  animation: faceGlow 3s ease-in-out infinite alternate;
}

@keyframes faceGlow {
  0%   { border-color: var(--color-fey-signal); box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.6), 0 0 10px rgba(71, 159, 250, 0.2); }
  100% { border-color: var(--color-fey-frost); box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.6), 0 0 20px rgba(182, 214, 255, 0.4); }
}

/* ── Captured Preview ── */
.captured-preview {
  border-radius: var(--radius-cards);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--color-fey-growth);
  box-shadow: 0 0 15px rgba(78, 190, 150, 0.15);
}
.captured-preview img {
  width: 100%;
  display: block;
}

.selfie-preview {
  width: 170px;
  height: 226px;
  border-radius: 50%;
  margin: 0 auto 20px;
}
.selfie-preview img {
  height: 100%;
  object-fit: cover;
}

/* ── OCR Loader ── */
.ocr-loader {
  text-align: center;
  padding: 16px 0;
}

.ocr-loader p {
  font-size: 13px;
  color: var(--color-fey-graphite);
  margin-bottom: 12px;
}

.progress-bar {
  width: 100%;
  height: 2px;
  background: var(--color-fey-smoke);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-fey-signal);
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* ── OCR Result input styling ── */
.ocr-result {
  text-align: center;
}

.result-label {
  display: block;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-fey-graphite);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.result-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-fey-smoke);
  border-radius: var(--radius-small);
  background: var(--surface-elevated);
  color: var(--color-fey-white);
  font-family: var(--font);
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-align: center;
  outline: none;
  transition: var(--transition);
}
.result-input:focus {
  border-color: var(--color-fey-signal);
}

.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* Initial start button */
.btn-start {
  margin-top: 4px;
  width: 100%;
}

/* Selfie capture button (shutter style) */
.btn-capture {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--color-fey-signal);
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  outline: none;
}
.btn-capture:hover {
  transform: scale(1.05);
  border-color: var(--color-fey-white);
}

.capture-ring {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-fey-signal);
  display: block;
  transition: var(--transition);
}
.btn-capture:hover .capture-ring {
  background: var(--color-fey-white);
}

.selfie-actions {
  display: flex;
  gap: 12px;
}

/* ── Success Screen ── */
.success-card {
  text-align: center;
  padding-top: 24px;
}

.success-icon {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
}

.success-icon svg {
  width: 72px;
  height: 72px;
}

.success-circle {
  fill: none;
  stroke: var(--color-fey-growth);
  stroke-width: 2.5;
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: circleIn 0.8s ease 0.1s forwards;
}

.success-tick {
  fill: none;
  stroke: var(--color-fey-growth);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: tickIn 0.5s ease 0.7s forwards;
}

@keyframes circleIn { to { stroke-dashoffset: 0; } }
@keyframes tickIn { to { stroke-dashoffset: 0; } }

/* Particle bursts desaturated to subtle highlights */
.success-particles {
  position: absolute;
  inset: -20px;
  pointer-events: none;
}
.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  animation: particleBurst 0.8s ease forwards;
}
@keyframes particleBurst {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0.6; }
  100% { opacity: 0; }
}

.success-title {
  font-size: var(--text-heading-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-fey-white);
  margin-bottom: 6px;
  letter-spacing: var(--tracking-heading-lg);
}

.success-desc {
  font-size: 13px;
  color: var(--color-fey-graphite);
  margin-bottom: 24px;
}

/* Summary Card table */
.summary-card {
  background: var(--surface-elevated);
  border: 1px solid var(--color-fey-smoke);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-align: left;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-muted);
}
.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-fey-graphite);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.summary-value {
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--color-fey-white);
  letter-spacing: 0.02em;
}

.summary-selfie {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--color-fey-growth);
}

/* ── Responsive Scaling ── */
@media (max-width: 520px) {
  .app-container {
    padding: 24px 12px 40px;
  }
  .glass-card {
    padding: 24px 16px;
  }
  .face-circle {
    width: 160px;
    height: 210px;
  }
}
