:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-secondary: #475569;
  
  --bkash: #d12053;
  --nagad: #ea580c;
  --rocket: #8c3494;
  --upay: #005c8a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-color);
  background-image: radial-gradient(#cbd5e1 0.75px, transparent 0.75px);
  background-size: 16px 16px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  color: var(--text-main);
}

/* ========================================================
   STEP 1: TWO-COLUMN CHECKOUT SCREEN (Screenshot 1)
   ======================================================== */
.payment-container {
  width: 100%;
  max-width: 860px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 20px 40px -10px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.checkout-view {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 480px;
}

@media (max-width: 768px) {
  .checkout-view {
    grid-template-columns: 1fr;
  }
}

/* Left Summary Panel */
.summary-panel {
  background: #ffffff;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #f1f5f9;
}

.brand-header {
  position: relative;
  padding-left: 14px;
  margin-bottom: 30px;
}

.brand-accent-line {
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--primary);
  border-radius: 4px;
}

.brand-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.merchant-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.main-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.meta-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.trx-id-badge {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.timer-pill-text {
  font-size: 11.5px;
  color: var(--text-muted);
}
.timer-pill-text strong {
  color: var(--text-main);
  font-weight: 700;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pricing-row.total-row {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 8px;
}

.summary-divider {
  border: 0;
  border-top: 1px solid #f1f5f9;
  margin: 28px 0;
}

.customer-details-section {
  margin-top: auto;
}

.customer-label-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin-bottom: 14px;
}

.cust-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  margin-bottom: 8px;
}

.cust-row-label {
  color: var(--text-muted);
}

.cust-row-val {
  color: var(--text-main);
  font-weight: 600;
}

/* Right Options Panel */
.options-panel {
  background: #ffffff;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}

.options-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
}

.filter-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.pill-btn {
  background: transparent;
  border: 1.5px solid #e2e8f0;
  padding: 7px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.pill-btn.active {
  background: #f0f7ff;
  border-color: var(--primary);
  color: var(--primary);
}

.methods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

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

.method-card-item {
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  min-height: 96px;
  text-align: center;
}

.method-card-item:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.method-card-item.selected {
  border-color: var(--primary);
  background: #fbfdff;
  box-shadow: 0 0 0 1.5px var(--primary);
}

.method-sub-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}

.btn-pay-action {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 15px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  margin-top: auto;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-pay-action:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-pay-action:active {
  transform: translateY(0);
}

.cancel-merchant-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.cancel-merchant-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}


/* ========================================================
   STEP 2 & STEP 3: CENTERED FLOATING MODAL CARDS (Screenshots 2 & 3)
   ======================================================== */
.gateway-modal-card {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
  border: 1px solid #f1f5f9;
  overflow: hidden;
  animation: fadeInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInModal {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #ffffff;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-modal-back {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #1e293b;
  transition: background 0.15s;
}
.btn-modal-back:hover {
  background: #f1f5f9;
}

.merchant-avatar-badge {
  width: 38px;
  height: 38px;
  background: #2563eb;
  border-radius: 10px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-meta-col {
  display: flex;
  flex-direction: column;
}

.modal-meta-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.modal-meta-val {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.modal-sub-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.modal-sub-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

/* Step 2 Vibrant Banner */
.brand-number-banner {
  padding: 34px 24px;
  background: #d12053; /* default bkash magenta */
  text-align: center;
  transition: background 0.3s ease;
}

.brand-number-prompt {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.phone-pill-input {
  width: 100%;
  max-width: 360px;
  height: 48px;
  border-radius: 12px;
  border: none;
  outline: none;
  background: #ffffff;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.15s ease;
}
.phone-pill-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), 0 6px 18px rgba(0, 0, 0, 0.15);
}
.phone-pill-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.modal-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 20px;
  background: #ffffff;
}

.btn-step-cancel {
  height: 46px;
  background: #f1f5f9;
  border: none;
  border-radius: 12px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-step-cancel:hover {
  background: #e2e8f0;
}

.btn-step-submit {
  height: 46px;
  background: #2563eb;
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.btn-step-submit:hover {
  background: #1d4ed8;
}
.btn-step-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Step 3 Body */
.step3-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step3-instruction-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.5;
}
.step3-instruction-card strong {
  color: #0f172a;
}

.step3-copy-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.step3-copy-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.step3-copy-label.blue-label {
  color: #2563eb;
}

.step3-copy-value {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}
.step3-copy-value.amount-blue {
  color: #2563eb;
  font-weight: 800;
}

.btn-copy-pill {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #2563eb;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-copy-pill:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.btn-copy-pill.copied {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.step3-status-bar {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step3-status-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
}

.step3-pulse-dot {
  width: 8px;
  height: 8px;
  background: #2563eb;
  border-radius: 50%;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.step3-timer-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.step3-sub-notes {
  text-align: center;
  padding: 4px 0 8px;
}

.step3-help-txt {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.step3-link-txt {
  font-size: 12.5px;
  color: #64748b;
}

.link-submit-trx {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}
.link-submit-trx:hover {
  color: #1d4ed8;
}

/* Manual Trx Accordion */
.manual-trx-accordion {
  border-top: 1px dashed #e2e8f0;
  padding-top: 16px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInModal 0.2s ease-out;
}

.trx-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trx-field {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s;
}
.trx-field:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.uppercase-input {
  text-transform: uppercase;
}

.btn-verify-submit {
  height: 46px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}
.btn-verify-submit:hover {
  background: #1d4ed8;
}
.btn-verify-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Toast Notice */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  max-width: 90%;
  text-align: center;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-notice.error {
  background: #ef4444;
}

.toast-notice.success {
  background: #10b981;
}
