*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.page-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Card */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Logo */
.card-logo {
  text-align: center;
  margin-bottom: 10px;
}

.brand-logo {
  width: 130px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.brand-logo--sm {
  width: 90px;
}

.card-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #4A1515;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 0.5px;
}

.card-subtitle {
  font-size: 14px;
  color: #888;
  margin-bottom: 28px;
  text-align: center;
}

/* Amount section */
.amount-section {
  width: 100%;
  margin-bottom: 20px;
}

.amount-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.amount-btn {
  padding: 14px 8px;
  border: 1.5px solid #ddd;
  background: #fff;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.amount-btn:hover {
  border-color: #F47C20;
  color: #F47C20;
}

.amount-btn.selected {
  background: #F47C20;
  border-color: #F47C20;
  color: #fff;
}

/* Other Amount */
.other-btn {
  width: 100%;
  padding: 14px;
  border: 1.5px solid #ddd;
  background: #fff;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  margin-top: 0;
  transition: border-color 0.15s, color 0.15s;
}

.other-btn:hover {
  border-color: #F47C20;
  color: #F47C20;
}

.other-btn.active {
  border-color: #F47C20;
  color: #F47C20;
}

/* Custom amount input */
.custom-input-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid #F47C20;
  border-radius: 6px;
  margin-top: 10px;
  overflow: hidden;
  background: #fff;
}

.currency-symbol {
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 700;
  color: #F47C20;
  background: #fff5ec;
  border-right: 1.5px solid #F47C20;
}

.custom-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 16px;
  color: #333;
}

.custom-input::-webkit-inner-spin-button,
.custom-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* Summary box */
.summary-box {
  width: 100%;
  background: #f8f8f8;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.summary-label {
  font-size: 14px;
  color: #555;
}

.summary-amount {
  font-size: 18px;
  font-weight: 700;
  color: #F47C20;
}

/* Donate button */
.donate-btn {
  width: 100%;
  padding: 16px;
  background: #F47C20;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  margin-bottom: 14px;
}

.donate-btn:hover {
  background: #d96a10;
}

.donate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error message */
.error-msg {
  color: #e53e3e;
  font-size: 13px;
  margin-bottom: 10px;
  text-align: center;
}

/* Stripe badge */
.stripe-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 12px;
}

.lock-icon {
  width: 13px;
  height: 13px;
  stroke: #aaa;
}

/* Bank transfer link */
.bank-link {
  font-size: 13px;
  color: #F47C20;
  text-decoration: underline;
  cursor: pointer;
}

.bank-link:hover {
  color: #d96a10;
}

/* Giving type toggle */
.giving-type {
  display: flex;
  width: 100%;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}

.giving-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.giving-btn.active {
  background: #fff;
  color: #F47C20;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* Utility */
.hidden {
  display: none !important;
}

/* ── Mobile ─────────────────────────────────────── */
@media (max-width: 480px) {
  body { padding: 16px; }

  .card {
    padding: 28px 20px 24px;
  }

  .brand-logo { width: 100px; }

  .card-title { font-size: 20px; }
  .card-subtitle { font-size: 13px; }

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

  .summary-box {
    padding: 14px 16px;
  }

  .donate-btn { font-size: 15px; padding: 14px; }

  /* Receipt on mobile */
  .receipt-card { padding: 24px 18px 20px; }
  .receipt-actions { flex-direction: column; }
  .receipt-row { font-size: 13px; }

  /* Bank transfer on mobile */
  .info-card { padding: 24px 12px; }

  .bank-details { overflow: visible; border-radius: 6px; }
  .bank-row { padding: 10px 10px; gap: 6px; }
  .bank-field { gap: 6px; }
  .bank-field-label { min-width: 80px; font-size: 12px; flex-shrink: 0; }
  .bank-field-value { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .payid-box { padding: 12px 12px; }
  .payid-value { font-size: 15px; letter-spacing: 0; white-space: nowrap; }
  .payid-row { gap: 8px; }

  .copy-btn { padding: 5px 10px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }

  /* QR on mobile */
  .qr-card { padding: 28px 20px; }
  #qr-canvas { width: 220px !important; height: 220px !important; }
}

/* Success / Bank transfer pages */
.info-card {
  background: #fff;
  border-radius: 12px;
  padding: 48px 36px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  text-align: center;
}

.info-card .icon {
  font-size: 52px;
  margin-bottom: 16px;
}

.info-card h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #4A1515;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.info-card p {
  font-size: 15px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.6;
}

.info-card .back-btn {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 32px;
  background: #F47C20;
  color: #fff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.info-card .back-btn:hover {
  background: #d96a10;
}

.bank-details {
  width: 100%;
  background: #f8f8f8;
  border-radius: 8px;
  margin: 16px 0;
  border: 1px solid #eee;
  overflow: hidden;
}

/* First and last rows get matching corner radius */
.bank-row:first-child { border-radius: 8px 8px 0 0; }
.bank-row:last-child  { border-radius: 0 0 8px 8px; }

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

.bank-row + .bank-row {
  border-top: 1px solid #eee;
}

.bank-field {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.bank-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #888;
  min-width: 110px;
  flex-shrink: 0;
}

.bank-field-value {
  font-size: 14px;
  font-weight: 600;
  color: #4A1515;
}

/* PayID box */
.payid-box {
  width: 100%;
  border: 2px solid #F47C20;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 16px 0 8px;
  text-align: left;
}

.payid-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.payid-badge {
  background: #F47C20;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.payid-label {
  font-size: 12px;
  color: #888;
}

.payid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payid-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payid-type {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.payid-value {
  font-size: 20px;
  font-weight: 700;
  color: #4A1515;
  letter-spacing: 1px;
  white-space: nowrap;
}

.copy-btn {
  padding: 8px 18px;
  background: #fff;
  border: 1.5px solid #F47C20;
  color: #F47C20;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.copy-btn:hover {
  background: #F47C20;
  color: #fff;
}

.copy-btn.copied {
  background: #4caf50;
  border-color: #4caf50;
  color: #fff;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 12px 0;
  color: #ccc;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #eee;
}

/* QR page */
.qr-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  text-align: center;
}

.qr-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: #4A1515;
  margin-bottom: 6px;
}

.qr-card p {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
}

#qr-canvas {
  display: block;
  margin: 0 auto 16px;
  border: 6px solid #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  border-radius: 8px;
}

.qr-url {
  font-size: 12px;
  color: #aaa;
  word-break: break-all;
  margin-bottom: 20px;
}

.download-btn {
  display: inline-block;
  padding: 10px 28px;
  background: #F47C20;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.download-btn:hover {
  background: #d96a10;
}

/* ── Mobile overrides for bank/PayID (must come after base styles) ── */
@media (max-width: 480px) {
  .info-card { padding: 24px 12px; }

  .bank-details { overflow: visible; }
  .bank-row { padding: 10px 10px; gap: 6px; }
  .bank-field { gap: 6px; }
  .bank-field-label { min-width: 80px; font-size: 12px; flex-shrink: 0; }
  .bank-field-value { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .payid-box { padding: 12px 12px; }
  .payid-value { font-size: 15px; letter-spacing: 0; white-space: nowrap; }
  .payid-row { gap: 8px; }
  .copy-btn { padding: 5px 10px; font-size: 12px; flex-shrink: 0; }
}
