/* Баланс Exp + кнопка «Пополнить» в шапке (base.html, index.html, new_debate.html, profile.html).
   Разметка: <a class="hdr-wallet [is-empty]" href="/billing">
               <span class="hdr-wallet-bal">💠 12.34<small>&nbsp;Exp</small></span>
               <span class="hdr-wallet-topup">＋<span class="hdr-wallet-label">Пополнить</span></span>
             </a> */
a.hdr-wallet {
  display: inline-flex; align-items: stretch; align-self: center; flex-shrink: 0;
  padding: 0; border-radius: 8px; overflow: hidden;
  border: 1px solid #8b5cf6; font-size: 0.85rem; line-height: 1.4; white-space: nowrap;
  color: var(--text); text-decoration: none;
}
a.hdr-wallet[hidden] { display: none; }
a.hdr-wallet:hover { background: none; text-decoration: none; }
.hdr-wallet-bal {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 10px; font-weight: 600; color: #a78bfa;
  background: rgba(139,92,246,0.10);
}
.hdr-wallet-bal small { font-size: inherit; font-weight: 500; opacity: 0.8; }
.hdr-wallet-topup {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  transition: filter 0.15s;
}
a.hdr-wallet:hover .hdr-wallet-topup { filter: brightness(1.15); }
a.hdr-wallet.is-empty { border-color: #e74c3c; }
a.hdr-wallet.is-empty .hdr-wallet-bal { color: #e74c3c; background: rgba(231,76,60,0.10); }
a.hdr-wallet.is-empty .hdr-wallet-topup {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  animation: hdrWalletPulse 2.4s ease-in-out infinite;
}
@keyframes hdrWalletPulse { 50% { filter: brightness(1.25); } }
html[data-theme="light"] .hdr-wallet-bal { color: #6d28d9; }
html[data-theme="light"] a.hdr-wallet.is-empty .hdr-wallet-bal { color: #c0392b; }
@media (max-width: 700px) {
  .hdr-wallet-label, .hdr-wallet-bal small { display: none; }
  .hdr-wallet-bal, .hdr-wallet-topup { padding: 3px 8px; }
}
