/* =====================================================================
   Sarfaraz Enterprise — Payment Page Styles
   Paytm QR display, order summary, status badges, success card
   ===================================================================== */

/* ---- Two-column layout ---- */
.pay-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ---- Order summary card ---- */
.pay-summary,
.pay-qr-panel {
  background: #fff;
  border-radius: var(--radius-lg, 22px);
  box-shadow: 0 8px 24px rgba(0, 32, 96, 0.10);
  padding: 2rem;
}
.pay-summary-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line, #e2e6ec);
}
.pay-summary-head h2 {
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  color: var(--navy, #002060);
  letter-spacing: 0.5px;
}
.pay-summary-head .eyebrow {
  background: var(--gold, #D4AF37);
  color: var(--navy-dark, #001845);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.pay-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}
.pay-status.awaiting   { background: #fef3c7; color: #92400e; }
.pay-status.processing { background: #dbeafe; color: #1e40af; }
.pay-status.paid       { background: #d1fae5; color: #065f46; }
.pay-status.failed     { background: #fee2e2; color: #991b1b; }
.pay-status.warn       { background: rgba(184,148,31,.18); color: #8a6b00; }

/* ---------- Payment mode selector ---------- */
.pay-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.pay-mode-card {
  background: #fff;
  border: 2px solid #eef2f7;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all .15s ease;
  font: inherit;
  color: inherit;
}
.pay-mode-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,175,55,.15);
}
.pay-mode-card.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212,175,55,.08) 0%, rgba(0,32,96,.04) 100%);
  box-shadow: 0 8px 24px rgba(212,175,55,.25);
}
.pay-mode-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.pay-mode-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.pay-mode-card h3 { margin: 0 0 .35rem 0; color: var(--navy); font-size: 1.05rem; }
.pay-mode-card p { margin: 0 0 .65rem 0; color: #4a5e7a; font-size: .9rem; }
.pay-mode-meta {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 12px;
}

/* ---------- Cash-pending card ---------- */
.cash-pending-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0,32,96,.06);
  border-left: 4px solid var(--gold);
}
.cash-pending-icon { font-size: 3rem; margin-bottom: 1rem; }
.cash-pending-card h2 { color: var(--navy); margin: 0 0 .5rem 0; }
.cash-pending-card p { color: #4a5e7a; }
.cash-pending-meta {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: #fafbfd;
  border-radius: 8px;
}
.cash-pending-meta .row {
  display: flex;
  justify-content: space-between;
  padding: .35rem 0;
  border-bottom: 1px dashed #eef2f7;
  font-size: .92rem;
}
.cash-pending-meta .row:last-child { border-bottom: 0; }
.cash-pending-meta .row strong { color: var(--navy); }
.cash-steps {
  margin: 1rem 0 0 0;
  padding-left: 1.25rem;
  color: #4a5e7a;
}
.cash-steps li { margin: .4rem 0; }
.cash-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ---- Items table ---- */
.pay-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.pay-items th,
.pay-items td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--line, #e2e6ec);
}
.pay-items th {
  color: var(--navy, #002060);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pay-items .t-right { text-align: right; }
.pay-items tfoot td {
  border-bottom: none;
  font-size: 1.1rem;
  font-weight: 700;
  padding-top: 1rem;
}
.pay-items tfoot .grand { color: var(--gold-dark, #b8941f); }

.pay-note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid var(--gold, #D4AF37);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--gray-700, #5b6677);
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.pay-note.warn {
  background: rgba(220, 38, 38, 0.08);
  border-left-color: var(--danger, #dc2626);
}

/* ---- QR Panel ---- */
.pay-qr-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f0f4fb 100%);
  position: sticky;
  top: 90px;
}
.pay-qr-head {
  text-align: center;
  margin-bottom: 1.25rem;
}
.pay-qr-head h3 {
  font-size: 1.2rem;
  color: var(--navy, #002060);
  margin: 0.5rem 0 0;
}
.pay-qr-logo {
  height: 36px;
  width: auto;
  display: inline-block;
}

.pay-qr-img-wrap {
  background: #fff;
  border: 2px solid var(--line, #e2e6ec);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  text-align: center;
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 6px var(--gold, #D4AF37);
}
.pay-qr-img-wrap img {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  display: block;
  image-rendering: pixelated;
}

.pay-merchant {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line, #e2e6ec);
}
.pay-merchant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--line, #e2e6ec);
}
.pay-merchant-row:last-child { border-bottom: none; }
.pay-merchant-row span { color: var(--gray-600, #5b6677); }
.pay-merchant-row strong { color: var(--navy, #002060); font-weight: 600; }
.pay-merchant-row .pay-amount {
  font-size: 1.3rem;
  color: var(--gold-dark, #b8941f);
  font-weight: 800;
}

.pay-steps {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1rem 1rem 2rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line, #e2e6ec);
  font-size: 0.85rem;
  line-height: 1.7;
}
.pay-steps li { padding: 0.25rem 0; }
.pay-steps li::marker { color: var(--gold, #D4AF37); font-weight: 700; }

/* ---- Confirm form ---- */
.pay-confirm {
  margin-top: 1rem;
}
.pay-confirm label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy, #002060);
  margin-bottom: 0.4rem;
}
.pay-confirm input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--line, #e2e6ec);
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.18s ease;
}
.pay-confirm input:focus {
  outline: none;
  border-color: var(--gold, #D4AF37);
}

.pay-trust {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(22, 163, 74, 0.06);
  border-radius: 10px;
  font-size: 0.8rem;
  color: #166534;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.pay-trust i { flex-shrink: 0; margin-top: 2px; }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}
.empty-state h2 {
  margin: 1rem 0 0.5rem;
  color: var(--navy, #002060);
}
.empty-state p {
  color: var(--gray-600, #5b6677);
  margin-bottom: 1.5rem;
}

/* ---- Success card ---- */
.success-card {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg, 22px);
  box-shadow: 0 12px 40px rgba(0, 32, 96, 0.12);
  padding: 3rem 2.5rem;
  text-align: center;
  border-top: 6px solid var(--success, #16a34a);
}
.success-icon {
  font-size: 4rem;
  color: var(--success, #16a34a);
  line-height: 1;
  margin-bottom: 1rem;
}
.success-card h2 {
  font-size: 1.6rem;
  color: var(--navy, #002060);
  margin-bottom: 0.75rem;
}
.success-card p {
  color: var(--gray-600, #5b6677);
  margin-bottom: 1.75rem;
}

.success-order {
  background: var(--bg-soft, #f8f9fb);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  text-align: left;
}
.success-order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line, #e2e6ec);
  font-size: 0.95rem;
}
.success-order-row:last-child { border-bottom: none; }
.success-order-row span { color: var(--gray-600, #5b6677); }
.success-order-row strong {
  color: var(--navy, #002060);
  font-family: 'Courier New', monospace;
}

.success-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}
.success-actions .btn { flex: 1 1 220px; }

.success-foot {
  margin-top: 1.25rem;
  font-size: 0.85rem;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .pay-layout { grid-template-columns: 1fr; }
  .pay-qr-panel { position: static; }
  .pay-summary-head h2 { font-size: 1.2rem; }
}

@media (max-width: 575.98px) {
  .pay-summary, .pay-qr-panel { padding: 1.25rem; }
  .pay-actions .btn { width: 100%; }
  .success-card { padding: 2rem 1.25rem; }
  .success-card h2 { font-size: 1.3rem; }
}

/* ---- Print ---- */
@media print {
  .pay-qr-panel, .float-actions, .navbar, .promo-sidebar { display: none; }
}