/* ==========================================================================
   PAANI KI BUND FOUNDATION - INTERACTIVE COMPONENTS & MODALS
   ========================================================================== */

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 24px 30px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-900);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--dark-600);
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--danger);
}

.modal-body {
  padding: 30px;
}

/* ==========================================================================
   DONATION MODAL WIZARD
   ========================================================================== */
.donation-amounts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.amount-btn {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--dark-800);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.amount-btn:hover, .amount-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.custom-amount-wrap {
  position: relative;
  margin-bottom: 24px;
}

.custom-amount-wrap span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark-600);
}

.custom-amount-wrap input {
  padding-left: 36px;
  font-weight: 700;
  font-size: 1.1rem;
}

.payment-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.payment-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-700);
  transition: var(--transition);
}

.payment-opt-btn:hover, .payment-opt-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* QR Code & UPI Styles */
.qr-modal-amount-banner {
  background: linear-gradient(135deg, #e0f7f4 0%, #f0fdf4 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: center;
  margin-bottom: 18px;
}

.qr-modal-amount-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: #008f7d;
  display: block;
}

.qr-preview-box {
  background: var(--gray-50);
  border: 1px dashed var(--gray-400);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  margin: 16px 0;
}

.qr-code-wrapper {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  display: inline-block;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  margin: 10px auto 14px auto;
  text-align: center;
}

.qr-code-wrapper img {
  width: 210px;
  height: 210px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

.upi-id-badge-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px dashed #00baa3;
  border-radius: 8px;
  padding: 10px 16px;
  margin: 12px auto;
  max-width: 380px;
}

.upi-id-text {
  font-family: monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}

.btn-copy-upi {
  background: #00baa3;
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-copy-upi:hover {
  background: #008f7d;
  transform: translateY(-1px);
}

.btn-copy-upi:active {
  transform: translateY(0);
}

.upi-apps-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 6px 0;
}

.upi-app-pill {
  font-size: 0.78rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

.btn-mobile-upi {
  display: none;
  width: 100%;
  text-align: center;
  background: #00baa3;
  color: #ffffff !important;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 186, 163, 0.3);
}

@media (max-width: 768px) {
  .btn-mobile-upi {
    display: block;
  }
}

.bank-details-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #334155;
  margin: 14px 0;
}

/* Printable 80G Receipt Card */
.receipt-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-top: 5px solid #00baa3;
  border-radius: 12px;
  padding: 24px;
  text-align: left;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.receipt-table td {
  padding: 8px 0;
  font-size: 0.9rem;
}

.receipt-table td:first-child {
  color: #64748b;
  width: 40%;
}

.receipt-table td:last-child {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.receipt-80g-note {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #166534;
  line-height: 1.5;
  margin-top: 12px;
}

@media print {
  body * {
    visibility: hidden;
  }
  .receipt-card, .receipt-card * {
    visibility: visible;
  }
  .receipt-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   IMAGE LIGHTBOX
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 25, 0.95);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.lightbox-caption {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 16px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 30px;
  color: var(--white);
  font-size: 2.2rem;
  cursor: pointer;
  background: none;
  border: none;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--dark-900);
  color: var(--white);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInUp 0.3s ease;
  border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: #22c55e; }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--primary); }

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