/* ═══════════════════════════════════════════════════════════
   Modern Checkout & Payment Styles
   ═══════════════════════════════════════════════════════════ */

/* ─── Checkout Page ─────────────────────────────────────── */
.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.checkout-hero {
  text-align: center;
  margin-bottom: 48px;
}

.checkout-hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.checkout-hero h1 {
  font-size: 2.5rem;
  margin: 12px 0 16px;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.payment-methods-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.payment-method-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.payment-method-option {
  position: relative;
  display: block;
  cursor: pointer;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.92));
  padding: 18px 20px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.payment-method-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-method-option:hover {
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.2);
}

.payment-method-ready {
  border-color: rgba(96, 165, 250, 0.28);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.88));
}

.payment-method-ready .payment-method-checkmark {
  opacity: 0;
}

.payment-method-active {
  border-color: rgba(16, 185, 129, 0.55);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.95));
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.22), 0 10px 28px rgba(16, 185, 129, 0.14);
  transform: translateY(-1px);
}

.payment-method-active .payment-method-checkmark {
  opacity: 1;
}

.payment-method-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(148, 163, 184, 0.1);
}

.payment-method-disabled:hover {
  transform: none;
  box-shadow: none;
}

.payment-method-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}

.payment-method-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  transition: all 0.3s ease;
}

.payment-method-active .payment-method-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.payment-method-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.payment-method-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.payment-method-title-row strong {
  font-size: 1.08rem;
  color: #f1f5f9;
  line-height: 1.4;
}

.payment-method-info p {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.65;
}

.payment-method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  max-width: max-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.payment-method-badge-active {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.payment-method-badge-disabled {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.payment-method-check {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  transition: all 0.3s ease;
}

.payment-method-active .payment-method-check {
  color: #10b981;
}

.payment-method-check svg circle {
  transition: all 0.3s ease;
}

.payment-method-active .payment-method-check svg circle {
  fill: rgba(16, 185, 129, 0.2);
}

.checkout-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.checkout-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  font-size: 1rem;
  font-weight: 700;
  min-height: 52px;
  width: 100%;
}

.checkout-actions .btn-secondary {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.checkout-actions .btn-primary .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: checkout-spin 0.8s linear infinite;
}

.checkout-actions .btn-primary.is-loading .btn-label,
.checkout-actions .btn-primary.is-loading .btn-icon {
  display: none;
}

.checkout-actions .btn-primary.is-loading .btn-spinner {
  display: inline-block;
}

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

.order-status-banner {
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.order-status-banner strong {
  display: block;
  margin-bottom: 6px;
}

.order-status-banner p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.7;
}

.order-status-banner--pending {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}

.order-status-banner--review,
.order-status-banner--processing {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}

.order-status-banner--success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

.order-status-banner--muted {
  background: rgba(148, 163, 184, 0.08);
}

.order-access-card {
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(16, 185, 129, 0.06);
}

.order-access-card--pending {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.06);
}

.order-access-body {
  margin-top: 10px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.8;
  color: #e2e8f0;
}

.checkout-trust-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.trust-badge svg {
  flex-shrink: 0;
  color: #10b981;
}

.checkout-sidebar {
  position: sticky;
  top: 20px;
}

.checkout-summary-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.checkout-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.checkout-item-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkout-item-info strong {
  color: #f1f5f9;
  font-size: 1rem;
}

.checkout-item-meta {
  color: #94a3b8;
  font-size: 0.85rem;
}

.checkout-item-price {
  color: #34d399;
  font-weight: 700;
  white-space: nowrap;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  margin-top: 20px;
}

.checkout-total span {
  color: #94a3b8;
  font-size: 0.95rem;
}

.checkout-total strong {
  color: #34d399;
  font-size: 1.5rem;
  font-weight: 800;
}

.checkout-note {
  display: flex;
  gap: 12px;
  align-items: start;
  padding: 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  margin-top: 20px;
}

.checkout-note svg {
  flex-shrink: 0;
  color: #60a5fa;
  margin-top: 2px;
}

.checkout-note p {
  color: #cbd5e1;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* ─── Modern Payment Page ───────────────────────────────── */
.modern-payment-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.payment-hero-section {
  text-align: center;
  margin-bottom: 48px;
}

.payment-status-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.status-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
  border: 2px solid rgba(59, 130, 246, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.status-icon-pending {
  color: #60a5fa;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
  }
}

.status-content {
  max-width: 700px;
}

.status-content h1 {
  font-size: 2.5rem;
  margin: 12px 0 16px;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.payment-timer-modern {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 50px;
  color: #fbbf24;
}

.timer-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timer-label {
  font-size: 0.85rem;
  color: #fcd34d;
}

.timer-value {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  letter-spacing: 2px;
}

.payment-main-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  align-items: start;
}

.payment-info-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.payment-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.payment-panel:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.payment-amount-panel {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
  border-color: rgba(16, 185, 129, 0.4);
}

.panel-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  flex-shrink: 0;
}

.panel-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-label {
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 600;
}

.panel-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #34d399;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.panel-unit {
  color: #6ee7b7;
  font-size: 1rem;
  font-weight: 600;
}

.payment-card-panel {
  background: linear-gradient(135deg, #1e3a5f, #0f2744);
  border-color: rgba(59, 130, 246, 0.4);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.payment-card-panel .panel-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.panel-header-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-sublabel {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0;
}

.card-number-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  margin-bottom: 16px;
}

.card-number-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: #eff6ff;
  direction: ltr;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
}

.card-holder-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.card-bank-badge {
  padding: 4px 12px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  color: #93c5fd;
  font-size: 0.85rem;
  font-weight: 600;
  margin-inline-start: auto;
}

.payment-auto-panel {
  border-color: rgba(167, 139, 250, 0.3);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
}

.auto-verify-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.auto-verify-header svg {
  color: #a78bfa;
}

.auto-verify-header strong {
  font-size: 1.2rem;
  color: #c4b5fd;
}

.auto-verify-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auto-verify-steps li {
  display: flex;
  align-items: start;
  gap: 14px;
  color: #cbd5e1;
  line-height: 1.6;
}

.auto-verify-steps svg {
  flex-shrink: 0;
  color: #10b981;
  margin-top: 2px;
}

.payment-sidebar-section {
  position: sticky;
  top: 20px;
}

.payment-summary-sidebar {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.summary-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.tracking-code-badge {
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  color: #93c5fd;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.summary-label {
  color: #94a3b8;
  font-size: 0.9rem;
}

.summary-value {
  color: #f1f5f9;
  font-weight: 600;
  text-align: end;
}

.status-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-badge-pending {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.summary-action {
  margin: 24px 0;
  padding: 24px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.summary-action .btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 700;
}

.action-note {
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
  margin: 12px 0 0;
  line-height: 1.5;
}

.summary-help {
  display: flex;
  gap: 14px;
  align-items: start;
  padding: 20px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 14px;
}

.summary-help svg {
  flex-shrink: 0;
  color: #60a5fa;
  margin-top: 2px;
}

.summary-help strong {
  display: block;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.summary-help p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0 0 10px;
  line-height: 1.5;
}

.help-link {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.help-link:hover {
  color: #93c5fd;
}

.payment-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
}

.payment-error-state svg {
  color: #ef4444;
}

.payment-error-state strong {
  color: #f1f5f9;
  font-size: 1.1rem;
}

.payment-error-state p {
  color: #94a3b8;
  margin: 0;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .checkout-layout,
  .payment-main-layout {
    grid-template-columns: 1fr;
  }

  .checkout-sidebar,
  .payment-sidebar-section {
    position: static;
  }

  .checkout-trust-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .checkout-hero h1,
  .status-content h1 {
    font-size: 2rem;
  }

  .payment-methods-card,
  .payment-panel,
  .checkout-summary-card,
  .payment-summary-sidebar {
    padding: 24px;
  }

  .checkout-actions {
    grid-template-columns: 1fr;
  }

  .payment-method-content {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }

  .payment-method-check {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 12px;
  }

  .card-number-display {
    flex-direction: column;
    align-items: stretch;
  }

  .card-number-text {
    font-size: 1.1rem;
    text-align: center;
  }

  .btn-copy {
    width: 100%;
    justify-content: center;
  }

  .panel-value {
    font-size: 2rem;
  }
}

@media (max-width: 520px) {
  .checkout-container,
  .modern-payment-container {
    padding: 24px 16px;
  }

  .payment-methods-card,
  .payment-panel,
  .checkout-summary-card,
  .payment-summary-sidebar {
    padding: 20px;
  }

  .status-icon {
    width: 64px;
    height: 64px;
  }

  .status-icon svg {
    width: 32px;
    height: 32px;
  }

  .checkout-hero h1,
  .status-content h1 {
    font-size: 1.6rem;
  }

  .panel-value {
    font-size: 1.8rem;
  }

  .card-number-text {
    font-size: 1rem;
    letter-spacing: 2px;
  }
}
