/* donations.css — Donate tab styles with neon animations */

/* ── Layout ────────────────────────────────────────────────────────────── */
/* display:none comes from .tab-panel in base.css (class selector).
   #tab-donations has higher specificity (ID), so display:flex must be
   scoped to .active — otherwise it overrides display:none on every tab. */
#tab-donations {
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding-top: 40px;
}

#tab-donations.active {
  display: flex;
}

.donate-header {
  text-align: center;
}

.donate-title {
  font-family: var(--font-label);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.donate-subtitle {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--dim);
  letter-spacing: 0.5px;
}

.donate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  max-width: 860px;
}

/* ── Stripe card ───────────────────────────────────────────────────────── */
.stripe-card {
  grid-column: 1 / -1;
  background: var(--bg2);
  border: 1px solid var(--pink);
  border-radius: 12px;
  padding: 36px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px -10px rgba(255, 45, 120, 0.2);
  animation: stripe-border-pulse 3s ease-in-out infinite;
}

@keyframes stripe-border-pulse {
  0%, 100% { box-shadow: 0 0 40px -10px rgba(255, 45, 120, 0.2); border-color: var(--pink); }
  50%       { box-shadow: 0 0 60px -4px  rgba(255, 45, 120, 0.45); border-color: var(--pink); }
}

/* Stripe scanline sweep */
.stripe-card::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 45, 120, 0.06) 50%,
    transparent 100%
  );
  animation: stripe-sweep 4s linear infinite;
  pointer-events: none;
}

@keyframes stripe-sweep {
  0%   { top: -60%; }
  100% { top: 120%; }
}

/* Corner sparks */
.stripe-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%,   rgba(255,45,120,0.08) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(192,132,252,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.stripe-icon {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
  animation: stripe-float 4s ease-in-out infinite;
}

@keyframes stripe-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.stripe-card-title {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}

.stripe-card-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dim);
  margin-bottom: 28px;
}

/* Stripe CTA button */
.btn-stripe {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 36px;
  border: 2px solid var(--pink);
  border-radius: 6px;
  color: var(--pink);
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  z-index: 1;
}

/* Stripe button shimmer fill */
.btn-stripe::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 45, 120, 0.18) 50%,
    transparent 70%
  );
  background-size: 250% 100%;
  background-position: 150% center;
  transition: background-position 0.5s ease;
  z-index: -1;
}

.btn-stripe:hover::before {
  background-position: -50% center;
}

.btn-stripe:hover {
  background: rgba(255, 45, 120, 0.12);
  box-shadow: 0 0 24px rgba(255, 45, 120, 0.5), inset 0 0 20px rgba(255, 45, 120, 0.08);
  /* color intentionally omitted — base color: var(--pink) has sufficient contrast in both themes */
}

/* Stripe button glitch on hover */
.btn-stripe:hover span {
  animation: stripe-btn-glitch 0.4s steps(1) 1;
}

@keyframes stripe-btn-glitch {
  0%   { clip-path: none; transform: none; }
  20%  { clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%); transform: translateX(2px); }
  40%  { clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%); transform: translateX(-2px); }
  60%  { clip-path: none; transform: none; }
  100% { clip-path: none; transform: none; }
}

/* ── Crypto address cards ──────────────────────────────────────────────── */
.crypto-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.crypto-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--coin-color, var(--cyan));
  box-shadow: 0 0 12px var(--coin-color, var(--cyan));
  transition: box-shadow 0.3s;
}

.crypto-card:hover {
  border-color: var(--coin-color, var(--border2));
  box-shadow: 0 0 32px -8px var(--coin-color, transparent);
}

.crypto-card:hover::before {
  box-shadow: 0 0 20px var(--coin-color, transparent);
}

/* Scanline on hover */
.crypto-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0; right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255,255,255,0.04) 50%,
    transparent 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.crypto-card:hover::after {
  opacity: 1;
  animation: crypto-scan 2s linear infinite;
}

@keyframes crypto-scan {
  0%   { top: -60%; }
  100% { top: 120%; }
}

/* Per-coin colors */
.crypto-card[data-coin="btc"] { --coin-color: #F7931A; }
.crypto-card[data-coin="eth"] { --coin-color: #627EEA; }
.crypto-card[data-coin="sol"] { --coin-color: #9945FF; }

.crypto-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.crypto-coin-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--coin-color, var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 14px -2px var(--coin-color, var(--purple));
  animation: coin-pulse 3s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes coin-pulse {
  0%, 100% { box-shadow: 0 0 14px -2px var(--coin-color, var(--purple)); }
  50%       { box-shadow: 0 0 22px  2px var(--coin-color, var(--purple)); }
}

.crypto-coin-name {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
}

.crypto-coin-ticker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--coin-color, var(--dim));
  margin-top: 2px;
}

/* QR code container */
.qr-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0;
  position: relative;
}

.qr-wrap canvas,
.qr-wrap img {
  border-radius: 6px;
  border: 2px solid var(--border2);
  padding: 6px;
  background: #fff;
  display: block;
}

/* Shown when no wallet address is configured (no config.js / empty env) */
.qr-placeholder {
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--dim);
  border-radius: 6px;
  border: 2px dashed var(--border2);
  padding: 6px;
}

/* Scanline overlay on QR */
.qr-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255,255,255,0.12) 50%,
    transparent 100%
  );
  background-size: 100% 8px;
  pointer-events: none;
  animation: qr-lines 2s linear infinite;
  opacity: 0.4;
  border-radius: 6px;
}

@keyframes qr-lines {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

/* Address display */
.crypto-address-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  overflow: hidden;
}

.crypto-address-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}

.btn-copy {
  flex-shrink: 0;
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--coin-color, var(--border2));
  border-radius: 3px;
  color: var(--coin-color, var(--dim));
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn-copy:hover {
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 8px -2px var(--coin-color, transparent);
}

.btn-copy.copied {
  color: var(--green) !important;
  border-color: var(--green) !important;
  animation: copy-flash 0.3s ease-out;
}

@keyframes copy-flash {
  0%   { box-shadow: 0 0 0 0 rgba(0,230,118,0.5); }
  100% { box-shadow: 0 0 16px 4px rgba(0,230,118,0); }
}

/* ── Third crypto card: full width on 2-col ────────────────────────────── */
@media (max-width: 700px) {
  .donate-grid { grid-template-columns: 1fr; }
}

/* ── Footer note ───────────────────────────────────────────────────────── */
.donate-note {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--dim);
  text-align: center;
  max-width: 500px;
  line-height: 1.7;
  padding-bottom: 24px;
}

.donate-note a {
  color: var(--cyan);
  text-decoration: none;
}

/* ── Light theme overrides ─────────────────────────────────────────────── */
[data-theme="light"] .stripe-card {
  background: #fff;
  border-color: var(--pink);
  box-shadow: 0 4px 32px rgba(216,27,96,0.14), 0 0 0 1px rgba(216,27,96,0.08);
  animation: none;      /* pulse glow invisible on light — disable */
}

[data-theme="light"] .stripe-card::before {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(216,27,96,0.04) 50%,
    transparent 100%
  );
}

[data-theme="light"] .crypto-card {
  background: #fff;
  border-color: rgba(0,0,0,0.07);
  box-shadow: 0 2px 16px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
}

[data-theme="light"] .crypto-card:hover {
  box-shadow: 0 6px 32px rgba(0,0,0,0.12), 0 0 0 1px var(--coin-color);
  border-color: var(--coin-color);
}

[data-theme="light"] .crypto-address-wrap {
  background: var(--bg3);
  border-color: rgba(0,0,0,0.1);
}

[data-theme="light"] .qr-wrap canvas,
[data-theme="light"] .qr-wrap img {
  border-color: rgba(0,0,0,0.12);
}

[data-theme="light"] .btn-stripe {
  border-width: 2px;
}

[data-theme="light"] .donate-note a {
  color: var(--cyan);
}

