/* ── Reset & Base ───────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green: #00D632;
  --green-dark: #00b82b;
  --green-light: #e6fbe9;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.08), 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-btn: 0 4px 18px rgba(0, 214, 50, 0.35);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Page Wrapper ──────────────────────────────── */
.page-wrapper {
  width: 100%;
  max-width: 480px;
  padding: 24px 16px;
}

/* ── Card ──────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px 28px 24px;
  position: relative;
  animation: cardIn 0.5s ease-out;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-handle {
  width: 40px;
  height: 4px;
  background: #d1d5db;
  border-radius: 99px;
  margin: 0 auto 24px;
}

/* ── Steps ─────────────────────────────────────── */
.step {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Header ────────────────────────────────────── */
.pay-title {
  font-size: 1.55rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 600;
}

.shield-icon {
  width: 14px;
  height: 14px;
}

/* ── Divider ───────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── Payment Method ────────────────────────────── */
.method-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
}

.cashapp-icon {
  width: 44px;
  height: 44px;
  background: var(--green);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 214, 50, 0.3);
}

.cashapp-icon svg {
  width: 24px;
  height: 24px;
}

.method-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.method-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Name Input ────────────────────────────────── */
.name-section {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.name-input {
  width: 100%;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1.8px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background: #f9fafb;
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.name-input:focus {
  border-color: var(--green);
  background: #fff;
}

.name-input::placeholder {
  color: var(--text-muted);
}

/* ── Amount Section ────────────────────────────── */
.amount-section {
  margin-top: 4px;
}

.amount-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.dollar-icon {
  width: 15px;
  height: 15px;
}

/* ── Amount Grid ───────────────────────────────── */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.amount-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--card-bg);
  border: 1.8px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 0;
  cursor: pointer;
  transition: all var(--transition);
}

.amount-btn:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.amount-btn.selected {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
  box-shadow: 0 0 0 2px rgba(0, 214, 50, 0.15);
  transform: scale(1.03);
}

.amount-btn:active {
  transform: scale(0.97);
}

/* ── Extra amounts ─────────────────────────────── */
.extra-amounts {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.extra-amounts.visible {
  max-height: 200px;
  opacity: 1;
  margin-top: 10px;
}

/* ── Custom Amount ─────────────────────────────── */
.custom-amount-wrapper {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f9fafb;
  border: 1.8px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  margin-top: 0;
}

.custom-amount-wrapper.visible {
  max-height: 60px;
  opacity: 1;
  margin-top: 10px;
  padding: 6px 14px;
}

.custom-dollar-sign {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
}

.custom-amount-input {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  padding: 8px 4px;
  color: var(--text-primary);
}

.custom-amount-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.custom-amount-input::-webkit-outer-spin-button,
.custom-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.custom-amount-input[type=number] {
  -moz-appearance: textfield;
}

/* ── Show More ─────────────────────────────────── */
.show-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  background: none;
  border: none;
  color: var(--green);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 0 4px;
  transition: color var(--transition);
}

.show-more-btn:hover {
  color: var(--green-dark);
}

.chevron-down {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.chevron-down.rotated {
  transform: rotate(180deg);
}

/* ── Pay Button ────────────────────────────────── */
.pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, #00c02e 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pay-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.pay-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 214, 50, 0.45);
}

.pay-btn:not(:disabled):active {
  transform: translateY(0) scale(0.98);
}

.pay-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.lock-icon {
  width: 17px;
  height: 17px;
}

.arrow-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.pay-btn:not(:disabled):hover .arrow-icon {
  transform: translateX(4px);
}

/* ── Spinner ───────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ═══════════════════════════════════════════════════
   STEP 2: Payment Details
   ═══════════════════════════════════════════════════ */

.step2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.back-btn {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition);
}

.back-btn:hover {
  color: var(--text-primary);
}

.awaiting-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #f59e0b;
  background: #fffbeb;
  padding: 4px 12px;
  border-radius: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-radius: 50%;
  animation: pulseDot 1.5s ease infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

.pay-title-sm {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* ── QR Section ────────────────────────────────── */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.qr-box {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box img {
  border-radius: 6px;
}

.qr-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
}

/* ── Address Section ───────────────────────────── */
.address-section {
  margin-bottom: 16px;
}

.address-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9fafb;
  border: 1.8px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.address-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
  flex: 1;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.02em;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.copy-btn:active {
  transform: scale(0.95);
}

/* ── Send Summary ──────────────────────────────── */
.send-summary {
  background: #f9fafb;
  border: 1.8px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  padding: 4px 0;
}

.summary-row span {
  color: var(--text-secondary);
}

.summary-row strong {
  color: var(--text-primary);
  font-weight: 700;
}

.summary-row+.summary-row {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 6px;
}

/* ── Instructions ──────────────────────────────── */
.instructions {
  margin-bottom: 18px;
}

.instr-step {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.instr-num {
  width: 22px;
  height: 22px;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Open Cash App Button ──────────────────────── */
.open-cashapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, #00c02e 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all var(--transition);
  margin-bottom: 10px;
}

.open-cashapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 214, 50, 0.45);
}

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

/* ── Verify Button ─────────────────────────────── */
.verify-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-light);
  border: 2px solid var(--green);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.verify-btn:hover {
  background: var(--green);
  color: #fff;
}

/* ═══════════════════════════════════════════════════
   STEP 3: Success
   ═══════════════════════════════════════════════════ */

.success-icon {
  text-align: center;
  margin-bottom: 16px;
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
  from {
    transform: scale(0.3);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.success-sub {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.receipt-box {
  background: #f9fafb;
  border: 1.8px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  padding: 5px 0;
}

.receipt-row span {
  color: var(--text-secondary);
}

.receipt-row strong {
  color: var(--text-primary);
  font-weight: 700;
}

.receipt-row+.receipt-row {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 6px;
}

.status-badge {
  background: #fffbeb;
  color: #f59e0b;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.success-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ── Footer ────────────────────────────────────── */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-shield {
  width: 13px;
  height: 13px;
}

.footer-link {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

/* ── Pulse animation ───────────────────────────── */
@keyframes selectPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 214, 50, 0.4);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(0, 214, 50, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 214, 50, 0);
  }
}

.amount-btn.pulse {
  animation: selectPulse 0.5s ease-out;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 400px) {
  .card {
    padding: 24px 18px 20px;
  }

  .pay-title {
    font-size: 1.35rem;
  }

  .amount-btn {
    padding: 10px 0;
    font-size: 0.88rem;
  }
}