/* Customer-flow specific styles (matches v1 visual language).
   Loaded alongside the global styles.css on the customer form only. */

.flow-wrap { max-width: 520px; margin: 0 auto; padding: 24px 20px 80px; }

/* Progress */
.progress-wrap { padding: 0 4px 24px; }
.progress-bar { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold); transition: width 0.5s ease; width: 0%; }
.progress-label { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; font-weight: 500; }

/* Steps */
.step { display: none; padding: 8px 0 24px; animation: stepFade 0.5s ease; }
.step.active { display: block; }
@keyframes stepFade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.step-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; color: var(--black); letter-spacing: -0.01em; }
.step-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 22px; line-height: 1.5; }

/* Fields (customer-form override — softer than the dashboard look) */
.flow-wrap .field { margin-bottom: 16px; }
.flow-wrap .field label { font-size: 12px; font-weight: 700; color: #555; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; display: block; }
.flow-wrap .field input, .flow-wrap .field select {
  width: 100%; padding: 14px 16px; border: 1.5px solid #e0e0e0; border-radius: 12px;
  font-size: 16px; background: #fafafa; color: var(--black);
}
.flow-wrap .field input:focus, .flow-wrap .field select:focus {
  outline: none; border-color: var(--black); background: #fff;
  box-shadow: 0 0 0 3px rgba(212, 182, 117, 0.20);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.amount-wrap { position: relative; }
.amount-wrap .prefix {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: #999; font-weight: 700;
}
.amount-wrap input { padding-left: 30px !important; }

/* Buttons (customer-form override — taller, bolder) */
.flow-wrap .btn {
  width: 100%; padding: 16px 18px; border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer; letter-spacing: 0.02em;
  margin-top: 6px; font-family: inherit; min-height: 52px;
}
.flow-wrap .btn-primary { background: var(--black); color: #fff; }
.flow-wrap .btn-primary:hover { opacity: 0.92; }
.flow-wrap .btn-primary:disabled { background: #ddd; color: #999; cursor: not-allowed; }
.flow-wrap .btn-secondary { background: #f0f0f0; color: var(--black); margin-top: 12px; }
.btn-verify {
  padding: 14px 18px; background: var(--gold); color: var(--black);
  border: none; border-radius: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
  font-size: 14px; min-height: 48px; font-family: inherit;
}
.verified-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #e5f5eb; color: var(--success); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; margin: 10px 0 16px;
}

/* Transition message */
.transition { display: none; padding: 60px 20px; text-align: center; animation: stepFade 0.4s ease; }
.transition.active { display: block; }
.transition-emoji { font-size: 56px; margin-bottom: 14px; line-height: 1; }
.transition-text { font-size: 22px; font-weight: 700; color: var(--black); line-height: 1.4; margin-bottom: 8px; }
.transition-sub { font-size: 14px; color: var(--muted); }
.approved-amount { font-size: 40px; font-weight: 800; color: var(--gold); margin: 18px 0 4px; letter-spacing: -0.5px; }
.approved-amount-sub { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 28px; }
.btn-link-back {
  display: inline-block; background: transparent; border: 0; color: var(--muted);
  font-size: 13px; padding: 14px 8px; cursor: pointer; text-decoration: underline;
  margin-top: 4px;
}
.btn-link-back:hover { color: var(--text); }

/* Breakdown card */
.breakdown { background: var(--black); border-radius: 16px; padding: 22px 20px; color: #fff; margin: 18px 0; }
.breakdown-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #888; margin-bottom: 14px; font-weight: 600; }
.breakdown-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.08); align-items: center; gap: 16px; }
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row .label { color: #aaa; }
.breakdown-row .value { font-weight: 600; }
.breakdown-row.highlight { padding: 14px 0; }
.breakdown-row.highlight .label { color: #fff; font-weight: 600; }
.breakdown-row.highlight .value { color: var(--gold); font-weight: 700; font-size: 20px; }
.breakdown-row.due .value { color: var(--gold); font-weight: 700; }

/* Full-screen "thinking" overlay during loan calculation (30s simulated review).
   Fixed-position so it covers the whole viewport — progress bar, header, brand panel. */
.loader { display: none; }
.loader.active {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: stepFade 0.3s ease;
}
.loader-dots { display: flex; justify-content: center; gap: 10px; margin-bottom: 24px; }
.loader-dot { width: 14px; height: 14px; background: var(--black); border-radius: 50%; animation: ldb 1.4s ease-in-out infinite; }
.loader-dot:nth-child(2) { animation-delay: 0.16s; }
.loader-dot:nth-child(3) { animation-delay: 0.32s; }
@keyframes ldb { 0%,80%,100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
.loader-text { font-size: 18px; color: var(--text); font-weight: 600; text-align: center; max-width: 480px; line-height: 1.4; }

/* Stripe element */
.stripe-element { padding: 14px 16px; border: 1.5px solid #e0e0e0; border-radius: 12px; background: #fafafa; transition: border-color 0.2s; min-height: 56px; }
.stripe-element.focused { border-color: var(--black); background: #fff; }
.error-msg { color: var(--danger); font-size: 13px; padding: 8px 0; min-height: 24px; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 14px; }
.secure svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Consent */
.consent { display: flex; align-items: flex-start; gap: 12px; padding: 12px; background: #faf6e8; border: 1px solid #f0e3b0; border-radius: 10px; margin: 8px 0 14px; font-size: 13px; line-height: 1.55; color: #5a4a18; cursor: pointer; }
.consent input { margin-top: 2px; }

/* Upload area */
.upload-area {
  position: relative;
  border: 2px dashed #d0d0d0; border-radius: 14px;
  background: #fafafa; padding: 28px 16px; text-align: center;
  cursor: pointer; overflow: hidden;
}
.upload-area input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-area svg.upload-icon { width: 40px; height: 40px; opacity: 0.5; fill: none; stroke: var(--black); stroke-width: 1.5; margin-bottom: 10px; }
.upload-area .upload-label { font-weight: 700; color: var(--black); font-size: 14px; margin-bottom: 4px; }
.upload-area .upload-hint { font-size: 12px; color: var(--muted); }
.upload-area .upload-preview { display: none; max-width: 100%; max-height: 220px; border-radius: 10px; margin: 0 auto; }
.upload-area .upload-remove {
  display: none; position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.7); color: white; border: none;
  padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer;
  width: auto; min-height: auto;
}
.upload-area.has-image { padding: 12px; border-style: solid; }
.upload-area.has-image svg.upload-icon, .upload-area.has-image .upload-label, .upload-area.has-image .upload-hint { display: none; }
.upload-area.has-image .upload-preview, .upload-area.has-image .upload-remove { display: block; }

/* Success icon */
.success-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, #B8975D 100%);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 44px; font-weight: 700; margin: 0 auto 18px;
  box-shadow: 0 8px 24px rgba(212, 182, 117, 0.3);
}

/* Mobile tightening */
@media (max-width: 640px) {
  .flow-wrap { padding: 18px 14px 60px; }
  .step-title { font-size: 22px; }
  .field-row { grid-template-columns: 1fr; gap: 8px; }
  .transition { padding: 50px 16px; }
  .transition-emoji { font-size: 48px; }
  .transition-text { font-size: 20px; }
  .breakdown { padding: 18px 16px; border-radius: 14px; }
  .breakdown-row.highlight .value { font-size: 18px; }
  .phone-row { flex-direction: column; align-items: stretch !important; }
  .phone-row .field { margin-bottom: 10px !important; }
  .btn-verify { width: 100%; }
}
