/* ==========================================================================
   REUSABLE STANDALONE CHECKOUT MODULE STYLES (FOR MULTI-PROJECT MOCKS)
   ========================================================================== */

:root {
  --checkout-accent-gold: #ffd166;
  --checkout-accent-green: #2ecc71;
  --checkout-bg-dark: rgba(20, 3, 9, 0.94);
  --checkout-border: rgba(255, 255, 255, 0.16);
  --checkout-text-primary: #ffffff;
  --checkout-text-muted: rgba(255, 255, 255, 0.7);
}

/* Modal Overlay backdrop */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Checkout Modal Popup Card */
.checkout-modal-card {
  max-width: 620px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--checkout-bg-dark);
  backdrop-filter: blur(24px);
  border: 1px solid var(--checkout-border);
  border-radius: 26px;
  padding: 2.2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  background: transparent;
  border: none;
  color: var(--checkout-text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--checkout-text-primary);
}

.checkout-header {
  margin-bottom: 1.4rem;
  text-align: center;
}

.checkout-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.3);
  color: var(--checkout-accent-gold);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.checkout-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--checkout-text-primary);
  letter-spacing: -0.5px;
}

.checkout-header p {
  font-size: 0.85rem;
  color: var(--checkout-text-muted);
  margin-top: 0.2rem;
}

.order-summary-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid var(--checkout-border);
  border-radius: 18px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.4rem;
}

.cart-items-header h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--checkout-text-primary);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: var(--checkout-text-muted);
  margin-bottom: 0.45rem;
}

.summary-divider {
  height: 1px;
  background: var(--checkout-border);
  margin: 0.8rem 0;
}

.summary-item.grand-total {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--checkout-text-primary);
  margin-bottom: 0;
}

.summary-item.grand-total span:last-child {
  color: var(--checkout-accent-gold);
  font-size: 1.2rem;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--checkout-text-primary);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 1.1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.input-with-icon input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--checkout-border);
  border-radius: 14px;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  color: var(--checkout-text-primary);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}

.input-with-icon input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}

/* 2-Tier Payment Method Styling */
.payment-category-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.pm-cat-tab {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--checkout-border);
  border-radius: 12px;
  color: var(--checkout-text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  padding: 0.65rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pm-cat-tab.active, .pm-cat-tab:hover {
  background: var(--checkout-text-primary);
  color: #111111;
  border-color: var(--checkout-text-primary);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

.payment-sub-options {
  position: relative;
}

.sub-option-group {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  animation: fadeInSub 0.3s ease forwards;
}

.sub-option-group.active {
  display: grid;
}

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

.cod-info-banner {
  grid-column: span 3;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
  color: var(--checkout-accent-green);
  line-height: 1.4;
}

.pm-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--checkout-border);
  border-radius: 12px;
  padding: 0.75rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.pm-card input {
  position: absolute;
  opacity: 0;
}

.pm-card.active, .pm-card:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--checkout-text-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.pm-card.active {
  border-color: var(--checkout-accent-gold);
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.35);
}

.pm-logo {
  font-size: 0.9rem;
  font-weight: 800;
}

.bkash-logo { color: #e2136e; font-weight: 900; }
.nagad-logo { color: #f7921e; font-weight: 900; }
.rocket-logo { color: #8c3294; font-weight: 900; }
.visa-logo { color: #4b86e8; font-size: 1.35rem; }
.master-logo { color: #eb001b; font-size: 1.35rem; }
.amex-logo { color: #006fcf; font-size: 1.35rem; }

.pm-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--checkout-text-muted);
  text-align: center;
  line-height: 1.2;
}

.submit-order-btn {
  background: linear-gradient(135deg, #ffffff 0%, #e6e6e6 100%);
  color: #111111;
  border: none;
  border-radius: 14px;
  padding: 0.95rem;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.submit-order-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.4);
}

.checkout-trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.4rem;
  text-align: center;
}

.checkout-trust-badge i {
  color: var(--checkout-accent-green);
}

/* ================= SUCCESS RECEIPT MODAL ================= */
.success-modal-card {
  text-align: center;
  align-items: center;
  max-width: 580px;
  width: 92%;
  background: var(--checkout-bg-dark);
  border: 1px solid var(--checkout-border);
  border-radius: 26px;
  padding: 2.2rem;
}

.success-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(46, 204, 113, 0.2);
  color: var(--checkout-accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 0.8rem auto;
}

.receipt-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--checkout-border);
  border-radius: 18px;
  padding: 1.4rem;
  margin: 1.2rem 0;
  text-align: left;
}

.receipt-header-print {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.receipt-brand h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--checkout-text-primary);
  letter-spacing: 0.5px;
}

.receipt-brand p {
  font-size: 0.76rem;
  color: var(--checkout-text-muted);
  margin-top: 0.15rem;
}

.receipt-location {
  font-size: 0.72rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

.receipt-title-badge {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--checkout-border);
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--checkout-accent-gold);
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 0.5rem;
  color: var(--checkout-text-muted);
}

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

.badge-payment {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.76rem;
  color: #ffffff;
}

.receipt-divider {
  height: 1px;
  background: var(--checkout-border);
  margin: 0.7rem 0;
}

.receipt-row.grand-total {
  font-size: 1.05rem;
  margin-bottom: 0;
}

.receipt-row.grand-total strong {
  color: var(--checkout-accent-green);
  font-size: 1.15rem;
}

.receipt-footer-seal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.9rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.seal-text {
  font-size: 0.72rem;
  color: #4ecdc4;
  font-weight: 600;
}

.thank-you-msg {
  font-size: 0.74rem;
  color: var(--checkout-text-muted);
  font-style: italic;
}

.success-actions {
  display: flex;
  gap: 0.8rem;
}

/* Printable PDF Invoice Styles */
@media print {
  body { background: #ffffff !important; color: #000000 !important; }
  body * { visibility: hidden; }
  #successModalOverlay, #successModalOverlay *, #printableCashMemo, #printableCashMemo * { visibility: visible !important; }
  #successModalOverlay { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: auto !important; background: #ffffff !important; padding: 0 !important; margin: 0 !important; }
  .success-modal-card { background: #ffffff !important; color: #000000 !important; border: none !important; box-shadow: none !important; max-width: 100% !important; width: 100% !important; padding: 0 !important; }
  .success-icon-wrap, .success-modal-card h2, .success-subtitle, .success-actions { display: none !important; }
  .receipt-card { background: #ffffff !important; border: 2px solid #000000 !important; border-radius: 8px !important; padding: 1.8rem !important; color: #000000 !important; margin: 0 auto !important; max-width: 700px !important; }
  .receipt-brand h3 { color: #000000 !important; }
  .receipt-brand p, .receipt-location { color: #444444 !important; }
  .receipt-title-badge { background: #000000 !important; color: #ffffff !important; border: none !important; }
  .receipt-row { color: #333333 !important; }
  .receipt-row strong { color: #000000 !important; }
  .receipt-row.grand-total strong { color: #16a085 !important; }
  .badge-payment { background: #eeeeee !important; color: #000000 !important; border: 1px solid #cccccc !important; }
  .receipt-divider { background: #cccccc !important; }
  .receipt-footer-seal { border-top: 1px dashed #aaaaaa !important; }
  .seal-text { color: #27ae60 !important; }
  .thank-you-msg { color: #555555 !important; }
}
