/**
 * File: payment-flow.css
 * Purpose: Defines styles for the Upgrade / Payment Flow process, including 
 * modal shell styling, payment cards, inputs, and step transitions.
 */
/* ════════════════════════════════════════════════════════════
   payment-flow.css — Upgrade / Payment Flow page
   Exact CSS extracted from Payment_Flow_Redesign_extracted_css.html
   Design tokens live in base.css.
   ════════════════════════════════════════════════════════════ */

/* ── SCRIM + MODAL SHELL ──────────────────────────────────────── */
.scrim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  z-index: 100;
}

.modal {
  width: 100%;
  max-width: 340px;
  margin: auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--modal-shadow);
  padding: 20px 18px 18px;
  position: relative;
  animation: pop-in 0.22s ease;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 480px) {
  .modal { padding: 22px 20px 20px; }
}

/* ── STEP PROGRESS TRACKER ───────────────────────────────────── */
.step-tracker {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 16px;
}

.step-tracker .seg {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: #e9edf5;
  overflow: hidden;
}

.step-tracker .seg .fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--blue);
  transition: width 0.3s ease;
}

.step-tracker .seg.done .fill   { width: 100%; }
.step-tracker .seg.active .fill { width: 100%; background: var(--blue); }

.step-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.step-label-row .step-count {
  flex: 1;
  min-width: 0;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.close-x {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #f1f4f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.close-x:hover { background: #e3e7ef; }
.close-x svg { width: 11px; height: 11px; }

/* ── ICON BADGE ──────────────────────────────────────────────── */
.modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.modal-icon.orange { background: var(--orange-soft); }
.modal-icon.blue   { background: var(--blue-soft); }
.modal-icon.green  { background: var(--green-soft); }

.modal-icon svg { width: 21px; height: 21px; }

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
.modal h2 {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin: 0 0 4px;
  line-height: 1.25;
}

.modal .sub {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 16px;
}

/* ── PLAN SUMMARY CARD ───────────────────────────────────────── */
.plan-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 13px;
  padding: 12px;
  margin-bottom: 14px;
}

.plan-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-row:last-child { margin-bottom: 0; }

.plan-row .label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.plan-row .value {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}

.plan-row .value.price {
  font-size: 16px;
  font-weight: 800;
}

.plan-row .value.price span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

/* ── FEATURE LIST ─────────────────────────────────────────────── */
.feature-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--ink);
}

.feature-list .tick {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.feature-list .tick svg { width: 9px; height: 9px; }

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 40px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.15s ease;
  font-family: var(--font-main);
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  margin-bottom: 8px;
}

.btn-primary:hover { box-shadow: 0 8px 20px rgba(15, 23, 42, 0.24); }

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--card-border);
}

.btn-secondary:hover { background: #f8fafc; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  height: 34px;
  font-size: 11.5px;
  font-weight: 600;
}

.btn-row { display: flex; gap: 8px; }
.btn-row .btn { margin-bottom: 0; }

.btn svg { width: 13px; height: 13px; }

/* ── QR / PAYMENT CARD ───────────────────────────────────────── */
.pay-card {
  background: var(--bg);
  border: 1.5px dashed #d8deea;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  margin-bottom: 12px;
}

.pay-amount {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}

.pay-amount span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.qr-box {
  width: 108px;
  height: 108px;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(20,30,70,0.06);
  overflow: hidden;
}

.qr-box svg { width: 82px; height: 82px; }
.qr-box img { width: 100%; height: 100%; object-fit: contain; }

.scan-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.upi-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 12px;
}

.upi-row .upi-id {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.1px;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--blue-soft);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.copy-btn:hover { background: #dde6ff; }
.copy-btn svg { width: 11px; height: 11px; }

.copy-toast {
  font-size: 10px;
  font-weight: 700;
  color: var(--green-soft-text);
  margin-top: 6px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.copy-toast.show { opacity: 1; }

.pay-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  margin-top: 2px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-soft-text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.pay-link-btn:hover { background: #dde6ff; }
.pay-link-btn:active { transform: scale(0.98); }
.pay-link-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.hint-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--blue-soft);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.hint-banner svg { width: 14px; height: 14px; min-width: 14px; margin-top: 1px; }

.hint-banner p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: #1e3a8a;
  font-weight: 500;
}

/* ── PROOF SUBMISSION TAB ROW ────────────────────────────────── */
.tab-row {
  display: flex;
  background: var(--bg);
  border-radius: 11px;
  padding: 3px;
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  height: 32px;
  border-radius: 9px;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.18s ease;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(20,30,70,0.08);
}

.field-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 5px;
  display: block;
}

.text-input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--card-border);
  padding: 0 13px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-main);
  color: var(--ink);
  margin-bottom: 14px;
  transition: border-color 0.15s ease;
  background: #ffffff;
  outline: none;
}

.text-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.text-input::placeholder { color: #aab3c5; }

.upload-zone {
  border: 1.5px dashed #d8deea;
  border-radius: 11px;
  padding: 18px 12px;
  text-align: center;
  margin-bottom: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  display: block;
}

.upload-zone:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.upload-zone .up-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

.upload-zone .up-icon svg { width: 16px; height: 16px; }

.upload-zone p {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.upload-zone span {
  font-size: 9.5px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

/* ── VERIFICATION IN PROGRESS ────────────────────────────────── */
.verify-wrap { text-align: center; }

.verify-ring-box {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
}

.verify-ring-box svg { width: 72px; height: 72px; transform: rotate(-90deg); }

.ring-bg { fill: none; stroke: #eef1f6; stroke-width: 6; }
.ring-fg {
  fill: none;
  stroke: var(--blue);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 198;
  stroke-dashoffset: 52;
  transition: stroke-dashoffset 1s linear;
}

.verify-ring-box .center-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-ring-box .center-icon svg.spin {
  width: 22px;
  height: 22px;
  transform: none;
  animation: spin 1.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.verify-timer {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.verify-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--orange-soft);
  color: var(--orange-soft-text);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

.verify-status-pill svg { width: 10px; height: 10px; }

.verify-timeline {
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
  background: var(--bg);
  border-radius: 11px;
  padding: 12px;
  margin-bottom: 14px;
}

.tl-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-dot {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-dot.done   { background: var(--green-soft); }
.tl-dot.active { background: var(--blue-soft); }
.tl-dot.pending{ background: #eef1f6; }

.tl-dot svg { width: 9px; height: 9px; }

.tl-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}

.tl-text.pending { color: var(--muted); font-weight: 500; }

.support-line {
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.45;
}

.support-line a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

/* ── SUCCESS STATE ─────────────────────────────────────────────── */
.success-wrap { text-align: center; }

.success-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  animation: success-pop 0.4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes success-pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.success-badge svg { width: 24px; height: 24px; }

.screen { display: none; }
.screen.visible { display: flex; }
