/* ==========================================================================
   TIERED DONATION MODAL & TOKEN OF LOVE ENGINE (ESEWA & KHALTI)
   ========================================================================== */

/* Rainbow-Neon Floating Trigger (Bottom-Left above Admin 'A') */
#donate-floating-trigger {
  position: fixed;
  bottom: 64px;
  left: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0f121a;
  cursor: pointer;
  z-index: 999997;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #ff0055;
  animation: rainbowNeon 6s infinite linear;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

#donate-floating-trigger:hover {
  transform: scale(1.15);
}

@keyframes rainbowNeon {
  0%   { border-color: #ff0055; box-shadow: 0 0 10px rgba(255, 0, 85, 0.6), 0 0 20px rgba(255, 0, 85, 0.3); }
  16%  { border-color: #ff7700; box-shadow: 0 0 10px rgba(255, 119, 0, 0.6), 0 0 20px rgba(255, 119, 0, 0.3); }
  33%  { border-color: #ffea00; box-shadow: 0 0 10px rgba(255, 234, 0, 0.6), 0 0 20px rgba(255, 234, 0, 0.3); }
  50%  { border-color: #00ff66; box-shadow: 0 0 10px rgba(0, 255, 102, 0.6), 0 0 20px rgba(0, 255, 102, 0.3); }
  66%  { border-color: #00d4ff; box-shadow: 0 0 10px rgba(0, 212, 255, 0.6), 0 0 20px rgba(0, 212, 255, 0.3); }
  83%  { border-color: #9d00ff; box-shadow: 0 0 10px rgba(157, 0, 255, 0.6), 0 0 20px rgba(157, 0, 255, 0.3); }
  100% { border-color: #ff0055; box-shadow: 0 0 10px rgba(255, 0, 85, 0.6), 0 0 20px rgba(255, 0, 85, 0.3); }
}

#donate-floating-trigger svg {
  width: 18px;
  height: 18px;
  fill: #ff2a5f;
  filter: drop-shadow(0 0 4px rgba(255, 42, 95, 0.6));
}

/* Modal Overlay */
#donate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 5, 10, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 9999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
}

.donate-modal-box {
  background: linear-gradient(170deg, #141724 0%, #0b0d14 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  width: 100%;
  max-width: 440px;
  padding: 24px 22px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9);
  position: relative;
  color: #f1f5f9;
  font-family: inherit;
  box-sizing: border-box;
  transition: max-width 0.3s ease;
}

.donate-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.donate-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Headers */
.donate-header {
  text-align: center;
  margin-bottom: 18px;
}

.donate-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.donate-header p {
  font-size: 12.5px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

/* QR Presentation */
.qr-container {
  background: #ffffff;
  padding: 10px;
  border-radius: 16px;
  width: 195px;
  height: 195px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(96, 187, 70, 0.3);
}

.qr-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Payment Card */
.payment-details-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-esewa {
  background: #60bb46;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.badge-khalti {
  background: #5c2d91;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.phone-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phone-display {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.copy-phone-btn {
  background: rgba(96, 187, 70, 0.15);
  border: 1px solid rgba(96, 187, 70, 0.4);
  color: #60bb46;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-phone-btn:hover {
  background: #60bb46;
  color: #ffffff;
}

/* Clean Mission Statement */
.support-mission-note {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid #60bb46;
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 16px;
  text-align: left;
}

.support-mission-note p {
  font-size: 11.5px;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

/* Form Styles */
.donate-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  text-align: left;
}

.donate-form-group label {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.donate-input {
  background: rgba(18, 22, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.donate-input:focus {
  border-color: #60bb46;
  box-shadow: 0 0 0 3px rgba(96, 187, 70, 0.15);
}

.donate-note {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.donate-primary-btn {
  width: 100%;
  background: #60bb46;
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(96, 187, 70, 0.3);
}

.donate-primary-btn:hover:not(:disabled) {
  background: #52a43b;
  transform: translateY(-1px);
}

.donate-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.donate-secondary-btn {
  width: 100%;
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 10px;
  font-size: 12.5px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
}

.donate-secondary-btn:hover {
  color: #fff;
}

/* Radar Spinner */
.live-radar-spinner {
  width: 44px;
  height: 44px;
  margin: 10px auto;
  border: 3px solid rgba(245, 158, 11, 0.2);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: radarSpin 1s infinite linear;
}

@keyframes radarSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   OFFICIAL TOKEN OF LOVE: 3 DISTINCT TIER DESIGNS
   ========================================================================== */

#cert-render-zone {
  width: 100%;
  margin: 0 auto;
  page-break-inside: avoid;
  break-inside: avoid;
}

.cert-frame {
  background: #08090d;
  border-radius: 16px;
  padding: 20px 18px;
  color: #ffffff;
  text-align: center;
  position: relative;
  box-sizing: border-box;
  page-break-inside: avoid;
  break-inside: avoid;
  transition: all 0.3s ease;
}

.cert-inner-box {
  border-radius: 12px;
  padding: 16px 14px;
  position: relative;
}

/* -------------------------------------------------------------
   TIER 1: COMMUNITY SUPPORTER (Rs. 10 – Rs. 100)
   Obsidian & eSewa Emerald
   ------------------------------------------------------------- */
.cert-tier-supporter {
  border: 2px solid rgba(96, 187, 70, 0.5) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(96, 187, 70, 0.1) !important;
}
.cert-tier-supporter .cert-inner-box {
  border: 1px dashed rgba(96, 187, 70, 0.3) !important;
}
.cert-tier-supporter .cert-seal {
  background: rgba(96, 187, 70, 0.12);
  border: 1px solid rgba(96, 187, 70, 0.4);
  color: #60bb46;
}
.cert-tier-supporter .cert-main-title {
  color: #ffffff;
}
.cert-tier-supporter .cert-recipient-name {
  color: #60bb46;
}

/* -------------------------------------------------------------
   TIER 2: DISTINGUISHED PATRON (Rs. 101 – Rs. 500)
   Specular Silver & Ice Cyan Glow
   ------------------------------------------------------------- */
.cert-tier-patron {
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.25) !important;
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08) 0%, #08090d 70%) !important;
}
.cert-tier-patron .cert-inner-box {
  border: 1.5px solid rgba(56, 189, 248, 0.45) !important;
}
.cert-tier-patron .cert-seal {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  letter-spacing: 1.8px;
}
.cert-tier-patron .cert-main-title {
  color: #e0f2fe;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}
.cert-tier-patron .cert-recipient-name {
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* -------------------------------------------------------------
   TIER 3: SOVEREIGN BENEFACTOR (Rs. 501+)
   24K Polished Metallic Gold & Royal Filigree
   ------------------------------------------------------------- */
.cert-tier-benefactor {
  border: 2.5px solid #f59e0b !important;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.95), 0 0 45px rgba(245, 158, 11, 0.35), inset 0 0 30px rgba(251, 191, 36, 0.06) !important;
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.12) 0%, #08090d 75%) !important;
}
.cert-tier-benefactor .cert-inner-box {
  border: 1.5px dashed rgba(251, 191, 36, 0.6) !important;
  box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.08);
}
.cert-tier-benefactor .cert-seal {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.3));
  border: 1px solid #fbbf24;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}
.cert-tier-benefactor .cert-main-title {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}
.cert-tier-benefactor .cert-recipient-name {
  background: linear-gradient(135deg, #ffffff 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 23px;
  letter-spacing: 0.5px;
}

/* Certificate Typography & Shared Structure */
.cert-seal {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.cert-main-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin: 0 0 4px 0;
}

.cert-sub-lead {
  font-size: 10.5px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.cert-recipient-name {
  font-size: 21px;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 8px;
}

.cert-quote {
  font-size: 11.5px;
  line-height: 1.45;
  color: #cbd5e1;
  max-width: 390px;
  margin: 0 auto 12px auto;
}

/* Certificate Grid */
.cert-data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
  text-align: left;
  font-size: 11px;
  align-items: center;
}

.cert-data-item strong {
  display: block;
  color: #94a3b8;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}

.cert-data-item span {
  color: #ffffff;
  font-family: monospace;
}

.cert-time-sub {
  display: block;
  font-size: 10px;
  color: #38bdf8 !important;
  font-family: monospace;
  margin-top: 1px;
}

/* Signature Slot */
.cert-signature-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.cert-signature-img {
  height: 44px;
  max-width: 125px;
  object-fit: contain;
  filter: invert(1) contrast(200%) brightness(140%);
  mix-blend-mode: screen;
  display: block;
  margin-top: 2px;
}

.cert-signer-name {
  font-size: 9.5px;
  color: #cbd5e1;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.cert-foot-seal {
  font-size: 9.5px;
  color: #94a3b8;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}

@media (max-width: 640px) {
  #donate-floating-trigger {
    bottom: 58px;
    left: 14px;
    width: 34px;
    height: 34px;
  }
  .donate-modal-box {
    padding: 20px 16px;
    border-radius: 18px;
  }
  .cert-frame {
    padding: 14px 10px;
  }
}