/* ============================================================
   ID request wizard
   ============================================================ */

.wiz-scene{
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- Sticky progress header ---------- */
.wiz-header{
  position: sticky;
  top: 0;
  z-index: 5;
  padding-top: max(var(--sp-2), var(--safe-top));
  padding-bottom: var(--sp-4);
  background: linear-gradient(180deg, var(--bg) 65%, transparent);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)){
  .wiz-header{ backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}
.wiz-header-top{
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.wiz-brand{ display: flex; align-items: center; gap: 8px; }
.wiz-brand img{ width: 24px; height: 24px; border-radius: 7px; }
.wiz-brand span{ font-weight: 800; font-size: 0.92rem; }
.wiz-step-label{ font-size: var(--fs-xs); font-weight: 700; color: var(--text-3); letter-spacing: 0.02em; }
.wiz-progress-track{
  height: 5px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--border); overflow: hidden;
}
.wiz-progress-fill{
  position: relative;
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width var(--dur-slow) var(--ease-out);
  width: 33.33%;
  overflow: hidden;
}
.wiz-progress-fill::after{
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: translateX(-100%);
  animation: bar-shine 2.8s ease-in-out infinite;
}
@keyframes bar-shine{
  0%, 20%{ transform: translateX(-100%); }
  70%, 100%{ transform: translateX(220%); }
}
@media (prefers-reduced-motion: reduce){ .wiz-progress-fill::after{ animation: none; } }

/* ---------- Step cards ---------- */
.wiz-body{ position: relative; flex: 1; padding-bottom: var(--sp-6); }
.step{
  padding: var(--sp-6) var(--sp-5);
  display: none;
}
@media (min-width: 400px){ .step{ padding: 30px 28px; } }
.step.is-active{ display: block; }
.step.is-active.dir-forward{ animation: step-in-right var(--dur-base) var(--ease-out); }
.step.is-active.dir-backward{ animation: step-in-left var(--dur-base) var(--ease-out); }
@keyframes step-in-right{ from{ opacity: 0; transform: translateX(20px); } to{ opacity: 1; transform: none; } }
@keyframes step-in-left{ from{ opacity: 0; transform: translateX(-20px); } to{ opacity: 1; transform: none; } }

/* Each field/section within the active step reveals in a gentle stagger. */
.step.is-active > *{
  opacity: 0; transform: translateY(8px);
  animation: field-rise 0.34s var(--ease-out) forwards;
}
.step.is-active > *:nth-child(1){ animation-delay: 0.02s; }
.step.is-active > *:nth-child(2){ animation-delay: 0.05s; }
.step.is-active > *:nth-child(3){ animation-delay: 0.08s; }
.step.is-active > *:nth-child(4){ animation-delay: 0.11s; }
.step.is-active > *:nth-child(5){ animation-delay: 0.14s; }
.step.is-active > *:nth-child(6){ animation-delay: 0.17s; }
.step.is-active > *:nth-child(7){ animation-delay: 0.2s; }
.step.is-active > *:nth-child(n+8){ animation-delay: 0.23s; }
@keyframes field-rise{ to{ opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){
  .step.is-active.dir-forward, .step.is-active.dir-backward{ animation: none; }
  .step.is-active > *{ animation: none; opacity: 1; transform: none; }
}

.step-head{ margin-bottom: var(--sp-6); }
.step-eyebrow{ font-size: var(--fs-xs); font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.step-title{ font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 6px; }
.step-sub{ color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }

.field-row{ display: flex; gap: var(--sp-4); }
.field-row .field{ flex: 1; min-width: 0; }
@media (max-width: 420px){
  .field-row{ flex-direction: column; gap: 0; }
}

.fieldset-title{
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3); margin: var(--sp-7) 0 var(--sp-2);
}
.fieldset-title:first-child{ margin-top: 0; }

/* ---------- Photo requirements ---------- */
.req-chips{ display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-5); }
.req-chip{
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 7px 12px 7px 10px;
  font-size: var(--fs-xs); color: var(--text-2); font-weight: 500;
}
.req-chip svg{ width: 13px; height: 13px; stroke: var(--text-3); flex-shrink: 0; }

/* ---------- Upload dropzone ---------- */
.dropzone{
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.dropzone:hover, .dropzone.is-drag{ border-color: var(--accent); background: var(--accent-soft); }
.dropzone:active{ transform: scale(0.99); }
.dropzone-icon{
  width: 46px; height: 46px; margin: 0 auto 14px;
  border-radius: 14px; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
}
.dropzone-icon svg{ width: 22px; height: 22px; stroke: var(--text-2); }
.dropzone-text{ font-size: var(--fs-sm); color: var(--text); font-weight: 600; }
.dropzone-text b{ color: var(--accent-2); }
.dropzone-sub{ font-size: var(--fs-xs); color: var(--text-3); margin-top: 5px; }

.upload-progress{ margin-top: var(--sp-4); max-height: 0; opacity: 0; overflow: hidden; transition: max-height var(--dur-base) var(--ease-out), opacity var(--dur-base); }
.upload-progress.show{ max-height: 60px; opacity: 1; }
.upload-track{
  height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden;
  position: relative;
}
.upload-track.is-indeterminate .upload-fill{
  width: 40% !important; animation: shimmer-slide 1.1s ease-in-out infinite;
}
@keyframes shimmer-slide{ 0%{ transform: translateX(-100%); } 100%{ transform: translateX(250%); } }
.upload-fill{ height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; transition: width var(--dur-fast) linear; }
.upload-meta{ display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-2); margin-top: 8px; }

.photo-preview{
  display: none; align-items: center; gap: 13px;
  margin-top: var(--sp-4); padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  animation: rise var(--dur-base) var(--ease-out);
}
.photo-preview.show{ display: flex; }
.photo-preview img{ width: 48px; height: 48px; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); flex-shrink: 0; }
.photo-preview .pf-icon{ width: 48px; height: 48px; border-radius: 9px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.photo-preview .pf-icon svg{ width: 20px; height: 20px; stroke: var(--text-2); }
.pf-info{ flex: 1; min-width: 0; }
.pf-name{ font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-status{ font-size: var(--fs-xs); color: var(--success); font-weight: 600; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.pf-status svg{ width: 12px; height: 12px; }
.pf-remove{
  background: none; border: none; color: var(--text-3); cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background var(--dur-fast), color var(--dur-fast);
}
.pf-remove:hover{ background: var(--danger-soft); color: var(--danger); }
.pf-remove svg{ width: 16px; height: 16px; }

/* ---------- Review ---------- */
.review-section{ margin-bottom: var(--sp-6); }
.review-section-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.review-section-title{ font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.review-edit{ font-size: var(--fs-xs); font-weight: 700; color: var(--accent-2); background: none; border: none; cursor: pointer; padding: 4px 2px; }
.review-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.review-item-label{ font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 3px; }
.review-item-value{ font-size: var(--fs-sm); font-weight: 600; word-break: break-word; }
.review-item-value.is-empty{ color: var(--text-3); font-weight: 500; font-style: italic; }
@media (max-width: 380px){ .review-grid{ grid-template-columns: 1fr; } }

.total-row{
  display: flex; align-items: center; justify-content: space-between;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--r-md); padding: 14px 15px; margin-bottom: var(--sp-6);
}
.total-label{ font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.total-value{ font-size: var(--fs-lg, 1.25rem); font-weight: 800; color: var(--text); }

.note-callout{
  display: flex; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 15px; margin-bottom: var(--sp-6);
  font-size: var(--fs-sm); line-height: 1.55; color: var(--text-2);
}
.note-callout svg{ width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; stroke: var(--text-3); }
.note-callout b{ color: var(--text); }

/* ---------- Sticky action bar ---------- */
.wiz-actions{
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex; gap: 10px;
  padding: var(--sp-4) 0 max(var(--sp-4), var(--safe-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 38%);
  margin-top: -20px;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)){
  .wiz-actions{ backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}
.wiz-actions .btn-primary{ flex: 1; }
.wiz-actions .btn-ghost{ flex: 0 0 auto; }

/* ---------- Review photo thumbnail ---------- */
.review-photo{ display: flex; align-items: center; gap: 12px; }
.review-photo-thumb{
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.review-photo-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.review-photo-thumb svg{ width: 20px; height: 20px; stroke: var(--text-3); }

/* ---------- Success scene ---------- */
.success-scene{
  max-width: 440px; margin: 0 auto; flex: 1;
  display: flex; flex-direction: column; justify-content: center;
}
.success-card{ padding: 48px 30px; text-align: center; }
.success-icon{
  position: relative;
  width: 72px; height: 72px; margin: 0 auto var(--sp-6);
  border-radius: 50%; background: var(--success-soft);
  display: flex; align-items: center; justify-content: center;
  animation: pop var(--dur-slow) var(--ease-spring);
}
@keyframes pop{ from{ transform: scale(0.6); opacity: 0; } to{ transform: scale(1); opacity: 1; } }
.success-icon::before{
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--success);
  opacity: 0;
  animation: success-ping 1.2s var(--ease-out) 0.4s 2;
}
@keyframes success-ping{
  0%{ transform: scale(0.85); opacity: 0.55; }
  100%{ transform: scale(1.7); opacity: 0; }
}
.success-icon svg{ width: 34px; height: 34px; }
.success-icon path{
  stroke: var(--success); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.55s var(--ease-out) 0.25s forwards;
}
.success-card h2{ font-size: var(--fs-xl); font-weight: 700; margin-bottom: 10px; letter-spacing: -0.025em; }
.success-card p{ color: var(--text-2); font-size: var(--fs-sm); line-height: 1.6; max-width: 34ch; margin: 0 auto; }
.success-next{
  margin: var(--sp-6) auto 0;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  max-width: 34ch;
}
.success-next-label{
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); margin-bottom: 6px;
}
.success-next p:not(.success-next-label){ font-size: var(--fs-sm); color: var(--text-2); line-height: 1.6; }
@media (prefers-reduced-motion: reduce){
  .success-icon{ animation: none; }
  .success-icon::before{ animation: none; }
  .success-icon path{ animation: none; stroke-dashoffset: 0; }
}
