/* ===================================================
   Payment Page — Dedicated Styles
   =================================================== */

/* ---------- Payment Body Override ---------- */
.payment-body {
  background: var(--bg);
}

/* ---------- Payment Hero ---------- */
.payment-hero {
  padding: 140px 0 60px;
  background: linear-gradient(160deg, #ecfdf5 0%, #d1fae5 40%, #a7f3d0 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.payment-hero-content {
  position: relative;
  z-index: 2;
}

.payment-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
}

.payment-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.payment-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.payment-hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.payment-hero-orb--1 {
  width: 400px;
  height: 400px;
  top: -150px;
  right: -100px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
}

.payment-hero-orb--2 {
  width: 300px;
  height: 300px;
  bottom: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(245, 158, 11, .15) 0%, transparent 70%);
  animation: float 10s ease-in-out infinite reverse;
}

/* ---------- Trust Strip ---------- */
.trust-strip {
  padding: 24px 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--surface-border);
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.trust-badge-icon {
  font-size: 1.3rem;
}

/* ---------- Payment Section Layout ---------- */
.payment-section {
  padding: 60px 0 100px;
}

.payment-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

/* ---------- Payment Card (Left) ---------- */
.payment-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  padding: 40px;
  box-shadow: var(--shadow);
}

/* ---------- Step Progress ---------- */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--text-muted);
  transition: all .4s cubic-bezier(.4, 0, .2, 1);
}

.step-dot.active .step-num,
.step-dot.completed .step-num {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.step-dot.completed .step-num {
  background: var(--income);
}

.step-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  transition: color .3s ease;
}

.step-dot.active .step-label,
.step-dot.completed .step-label {
  color: var(--primary);
}

.step-line {
  flex: 1;
  height: 3px;
  background: #e2e8f0;
  margin: 0 8px;
  margin-bottom: 22px;
  border-radius: 3px;
  transition: background .4s ease;
  max-width: 100px;
}

.step-line.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* ---------- Payment Steps ---------- */
.payment-step {
  display: none;
  animation: stepFadeIn .4s ease;
}

.payment-step.active {
  display: block;
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

.step-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.step-desc {
  font-size: .92rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ---------- Step Navigation ---------- */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 16px;
}

/* ---------- Type Cards (Step 1) ---------- */
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--surface-border);
  background: var(--bg);
  cursor: pointer;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  text-align: center;
}

.type-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px var(--primary-glow);
}

.type-card.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(13, 148, 136, .06), rgba(13, 148, 136, .02));
  box-shadow: 0 4px 20px var(--primary-glow);
}

.type-icon {
  font-size: 2rem;
}

.type-name {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
}

.type-detail {
  font-size: .72rem;
  color: var(--text-muted);
}

/* ---------- Amount Grid (Step 2) ---------- */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.amount-tile {
  padding: 18px 12px;
  border: 2px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  color: var(--text);
}

.amount-tile:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.amount-tile.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.custom-amount-wrap {
  position: relative;
  margin-bottom: 28px;
}

.currency-symbol {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.custom-amount-wrap input {
  width: 100%;
  padding: 18px 18px 18px 48px;
  border: 2px solid var(--surface-border);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: 600;
  background: var(--bg);
  outline: none;
  transition: var(--transition);
}

.custom-amount-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ---------- Recurring Toggle ---------- */
.recurring-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(13, 148, 136, .04), rgba(245, 158, 11, .04));
  border: 1px solid var(--surface-border);
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 28px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  left: 3px;
  top: 3px;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.toggle-switch input:checked+.toggle-slider {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(24px);
}

.recurring-info strong {
  display: block;
  font-size: .88rem;
  margin-bottom: 2px;
}

.recurring-info span {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ---------- Form Rows ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.payment-card .form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: var(--font-body);
  background: var(--bg);
  outline: none;
  transition: var(--transition);
  resize: vertical;
}

.payment-card .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ---------- Checkbox ---------- */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: .88rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ---------- Payment Method Cards (Step 4) ---------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.method-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border: 2px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  transition: all .3s ease;
}

.method-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.method-card.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(13, 148, 136, .06), rgba(13, 148, 136, .02));
  box-shadow: 0 4px 16px var(--primary-glow);
}

.method-info strong {
  display: block;
  font-size: .85rem;
  color: var(--text);
}

.method-info span {
  font-size: .72rem;
  color: var(--text-muted);
}

/* ---------- Method Details Panels ---------- */
.method-details {
  display: none;
  animation: stepFadeIn .3s ease;
}

.method-details.active {
  display: block;
}

/* UPI Details */
.upi-wrapper {
  display: flex;
  align-items: center;
  gap: 32px;
}

.qr-placeholder {
  text-align: center;
  flex-shrink: 0;
}

.qr-box {
  width: 180px;
  height: 180px;
  border: 2px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.qr-pattern {
  position: absolute;
  inset: 12px;
  background:
    repeating-linear-gradient(0deg, var(--primary-dark) 0, var(--primary-dark) 4px, transparent 4px, transparent 8px),
    repeating-linear-gradient(90deg, var(--primary-dark) 0, var(--primary-dark) 4px, transparent 4px, transparent 8px);
  opacity: .12;
  border-radius: 4px;
}

.qr-logo {
  position: relative;
  z-index: 2;
  font-size: 2.5rem;
  width: 56px;
  height: 56px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
}

.qr-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.upi-or {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-light);
  padding: 8px 16px;
  background: var(--bg);
  border-radius: 50px;
  border: 1px solid var(--surface-border);
}

.upi-id-wrap {
  flex: 1;
}

.upi-id-wrap>label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.upi-copy-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
}

.upi-copy-box span {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: .5px;
}

.copy-btn {
  padding: 8px 16px;
  border: 1px solid var(--surface-border);
  border-radius: 50px;
  background: var(--bg-alt);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.copy-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.copy-btn.copied {
  background: var(--income);
  color: #fff;
  border-color: var(--income);
}

/* Bank Transfer Details */
.bank-info-card {
  background: linear-gradient(135deg, rgba(13, 148, 136, .05), rgba(13, 148, 136, .02));
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 16px;
}

.bank-info-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--primary-dark);
}

.bank-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(13, 148, 136, .08);
  font-size: .88rem;
}

.bank-row:last-child {
  border-bottom: none;
}

.bank-row span {
  color: var(--text-muted);
}

.bank-row strong {
  color: var(--text);
  font-weight: 600;
}

.bank-note {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ---------- Large Button ---------- */
.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

/* ---------- Summary Sidebar ---------- */
.payment-summary {
  position: sticky;
  top: 100px;
}

.summary-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  padding: 32px;
  box-shadow: var(--shadow);
}

.summary-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.summary-divider {
  height: 1px;
  background: var(--surface-border);
  margin: 20px 0;
}

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

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

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

.summary-total {
  font-size: 1rem;
}

.summary-total strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: var(--text-muted);
}

.summary-info-item span {
  color: var(--income);
  font-weight: 700;
  font-size: .9rem;
}

.quran-verse-card {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(13, 148, 136, .06), rgba(245, 158, 11, .06));
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.quran-verse-card em {
  display: block;
  font-size: .85rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 8px;
}

.quran-verse-card span {
  font-size: .75rem;
  color: var(--primary);
  font-weight: 600;
}

/* ================================================================
   SUCCESS STATE
   ================================================================ */
.success-content {
  text-align: center;
  padding: 20px 0;
}

.success-animation {
  margin-bottom: 28px;
}

.success-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.success-check {
  width: 80px;
  height: 80px;
}

.success-check-circle {
  stroke: var(--income);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: checkCircle .6s cubic-bezier(.65, 0, .45, 1) forwards;
  animation-delay: .1s;
}

.success-check-path {
  stroke: var(--income);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkMark .4s cubic-bezier(.65, 0, .45, 1) forwards;
  animation-delay: .5s;
}

@keyframes checkCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes checkMark {
  to {
    stroke-dashoffset: 0;
  }
}

.success-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.success-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Receipt Card */
.receipt-card {
  background: var(--bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
}

.receipt-id {
  opacity: .8;
  font-size: .78rem;
}

.receipt-body {
  padding: 8px 24px 16px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-border);
  font-size: .88rem;
}

.receipt-row:last-child {
  border-bottom: none;
}

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

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

.receipt-amount {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--primary-dark) !important;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.success-note {
  font-size: .82rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ================================================================
   RESPONSIVE — Payment Page
   ================================================================ */
@media (max-width: 1024px) {
  .payment-layout {
    grid-template-columns: 1fr;
  }

  .payment-summary {
    position: static;
    order: -1;
  }

  .upi-wrapper {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {

  .payment-card {
    padding: 24px;
  }

  .type-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .trust-badges {
    gap: 20px;
  }

  .step-label {
    display: none;
  }

  .step-line {
    margin-bottom: 0;
  }

  .step-progress {
    margin-bottom: 28px;
  }
}

@media (max-width: 480px) {
  .type-grid {
    grid-template-columns: 1fr;
  }

  .trust-badges {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .payment-hero h1 {
    font-size: 1.8rem;
  }
}
