/* =========================================================
   DIGISTASH & FREEPDF - "BUY ME A CHAI ☕" PREMIUM DONATE MODAL
   ========================================================= */

/* Topbar "Buy Me a Chai" Signature Button */
.fp-donate-btn {
  height: 44px;
  padding: 0 18px 0 10px;
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(124, 58, 237, 0.35));
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.fp-donate-btn:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: #fde68a;
  background: linear-gradient(135deg, #f59e0b, #7c3aed);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.65), 0 0 20px rgba(124, 58, 237, 0.5);
  color: #fff;
}

.fp-chai-gif-btn {
  width: 34px;
  height: 34px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border-radius: 8px;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.8));
  transition: transform 0.2s ease;
}

.fp-donate-btn:hover .fp-chai-gif-btn {
  transform: scale(1.1);
}

.fp-chai-gif-modal {
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
  border-radius: 18px;
  filter: drop-shadow(0 4px 16px rgba(245, 158, 11, 0.9));
}

.fp-chai-svg {
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible;
}

.fp-steam-1 {
  animation: fpSteamRise 2.2s infinite ease-out;
  transform-origin: center bottom;
}
.fp-steam-2 {
  animation: fpSteamRise 2.2s infinite ease-out 0.4s;
  transform-origin: center bottom;
}
.fp-steam-3 {
  animation: fpSteamRise 2.2s infinite ease-out 0.8s;
  transform-origin: center bottom;
}

@keyframes fpSteamRise {
  0% {
    opacity: 0;
    transform: translateY(2px) scale(0.8);
  }
  35% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateY(-6px) scale(1.3);
  }
}

/* Modal Overlay & Card */
.fp-donate-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999999 !important;
  background: rgba(4, 7, 15, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.fp-donate-modal-backdrop.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.fp-donate-modal {
  position: relative;
  width: min(490px, calc(100vw - 24px));
  background: linear-gradient(180deg, #0e1424 0%, #080c16 100%);
  border: 1.5px solid rgba(0, 229, 255, 0.28);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.14);
  transform: scale(0.95) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f7fbff;
  font-family: 'DM Sans', -apple-system, sans-serif;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.fp-donate-modal-backdrop.is-open .fp-donate-modal {
  transform: scale(1) translateY(0);
}

.fp-donate-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-size: 19px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.fp-donate-close:hover {
  color: #fff;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

/* Modal Header & Steaming Chai Orb */
.fp-donate-header {
  text-align: center;
  margin-bottom: 20px;
  padding-top: 2px;
}

.fp-chai-orb {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(13, 18, 34, 0.95) 75%);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.fp-chai-modal-svg {
  width: 48px;
  height: 48px;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.5));
}

.fp-modal-steam-1 {
  animation: fpModalSteamRise 2.4s infinite ease-out;
  transform-origin: center bottom;
}
.fp-modal-steam-2 {
  animation: fpModalSteamRise 2.4s infinite ease-out 0.45s;
  transform-origin: center bottom;
}
.fp-modal-steam-3 {
  animation: fpModalSteamRise 2.4s infinite ease-out 0.9s;
  transform-origin: center bottom;
}

@keyframes fpModalSteamRise {
  0% {
    opacity: 0;
    transform: translateY(3px) scale(0.8);
  }
  35% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateY(-9px) scale(1.35);
  }
}

.fp-donate-modal h3 {
  font: 800 clamp(19px, 3.2vw, 23px)/1.2 'Syne', sans-serif;
  margin: 0 0 6px;
  color: #fff;
}

.fp-donate-modal h3 span {
  color: #fbbf24;
}

.fp-donate-modal p.fp-modal-sub {
  color: #94a3b8;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 auto 18px;
  max-width: 390px;
}

/* 1. Chai Treat Presets Grid (Chips) */
.fp-treat-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 800 10.5px 'JetBrains Mono', monospace;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 9px;
}

.fp-treat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.fp-treat-card {
  position: relative;
  background: rgba(14, 20, 36, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 11px 13px;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.fp-treat-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
  background: rgba(245, 158, 11, 0.08);
}

.fp-treat-card.selected {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(124, 58, 237, 0.14));
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.fp-treat-badge {
  position: absolute;
  top: -7px;
  right: 8px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #000;
  font: 900 8.5px 'JetBrains Mono', monospace;
  padding: 1.5px 6px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fp-treat-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fp-treat-emoji {
  font-size: 16px;
}

.fp-treat-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.fp-treat-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  color: #fbbf24;
}

/* Custom Treat Input */
.fp-custom-treat-box {
  display: none;
  align-items: center;
  gap: 10px;
  background: #050811;
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

.fp-custom-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 800;
}

/* Selected Treat Banner */
.fp-order-summary-banner {
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 9px 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fp-summary-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #fde68a;
}

.fp-summary-amount-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 800;
  background: #f59e0b;
  color: #000;
  padding: 3px 8px;
  border-radius: 6px;
}

/* 2. Payment Method Tabs */
.fp-donate-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.fp-donate-tabs::-webkit-scrollbar { display: none; }

.fp-donate-tab {
  padding: 6px 13px;
  border-radius: 999px;
  font: 700 11px 'JetBrains Mono', monospace;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.fp-donate-tab:hover {
  color: #00e5ff;
  border-color: rgba(0, 229, 255, 0.4);
}

.fp-donate-tab.active {
  color: #05070d;
  background: linear-gradient(135deg, #00e5ff, #67e8f9);
  border-color: #00e5ff;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.3);
}

/* Detail Panels */
.fp-donate-panel {
  display: none;
  background: #050811;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  box-sizing: border-box !important;
  width: 100% !important;
  overflow: hidden !important;
  animation: fpFadeIn 0.22s ease-out;
}

.fp-donate-panel.active {
  display: block;
}

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

.fp-donate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  box-sizing: border-box !important;
  width: 100% !important;
}

.fp-donate-row:last-child {
  border-bottom: 0;
}

.fp-donate-label {
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.fp-donate-value {
  color: #f7fbff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.fp-copy-btn {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  font: 700 10px 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fp-copy-btn:hover {
  background: #00e5ff;
  color: #05070d;
}

.fp-copy-btn.copied {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #fff !important;
}

/* View QR Toggle Button */
.fp-qr-toggle-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  font: 700 11px 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fp-qr-toggle-btn:hover {
  background: #00e5ff;
  color: #05070d;
}

/* Modal Bottom Action & TID Form */
.fp-tid-section {
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 14px;
  padding: 14px;
}

.fp-tid-header {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fp-tid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .fp-tid-grid {
    grid-template-columns: 1fr;
  }
}

.fp-tid-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fp-tid-field label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  font-family: 'DM Sans', sans-serif;
}

.fp-tid-input {
  width: 100%;
  background: rgba(6, 8, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 8px 12px;
  color: #fff;
  font-size: 12.5px;
  font-family: 'DM Sans', sans-serif;
  box-sizing: border-box;
  transition: all 0.2s ease;
  outline: none;
}

.fp-tid-input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
  background: #090d16;
}

.fp-tid-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 11.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 10px;
  text-align: center;
}

.fp-sent-chai-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #05070d;
  border: none;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  font-family: 'Syne', 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fp-sent-chai-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.55);
}

.fp-sent-chai-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Success Receipt Screen Inside Modal */
.fp-success-body {
  padding: 10px 4px 6px;
  text-align: center;
}

.fp-success-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.fp-success-orb {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(13, 18, 34, 0.9) 70%);
  border: 2px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
  animation: fpSuccessPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fpSuccessPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.fp-success-title {
  font-size: 20px;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  color: #fff;
  margin: 0 0 6px;
}

.fp-success-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 16px;
  line-height: 1.5;
}

.fp-success-receipt-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: left;
}

.fp-success-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.fp-success-row:last-child {
  border-bottom: none;
}

.fp-slabel {
  color: #64748b;
  font-family: 'DM Sans', sans-serif;
}

.fp-sval {
  color: #f7fbff;
  font-weight: 700;
}

.fp-donate-footer-note {
  font-size: 10.5px;
  color: #64748b;
  text-align: center;
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
}

