/* ─── ABN Zap Modal v1.0.1 — matches designer spec exactly ─── */
:root {
  --zap-bg: #0a0a0b;
  --zap-bg-elev: #131316;
  --zap-bg-elev2: #1b1b1f;
  --zap-line: #26262b;
  --zap-line-strong: #34343a;
  --zap-text: #f4f4f5;
  --zap-text-dim: #a1a1aa;
  --zap-text-mute: #71717a;
  --zap-orange: #ff8a1f;
  --zap-orange-soft: #ffae5e;
  --zap-orange-deep: #d96b0a;
  --zap-orange-glow: rgba(255,138,31,0.35);
  --zap-cream: #f5e6c8;
  --zap-cream-soft: #fbf2dc;
  --zap-cream-deep: #e6cf9b;
  --zap-cream-glow: rgba(245,230,200,0.35);
}

/* ─── Overlay ─── */
.abn-zap-overlay {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.abn-zap-overlay.active {
  opacity: 1; pointer-events: auto;
}

/* ─── Modal root ─── */
.abn-zap-modal-root {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
.abn-zap-modal-root.active {
  pointer-events: auto;
  opacity: 1;
}

.abn-zap-modal {
  width: 100%; max-width: 420px;
  background: var(--zap-bg-elev);
  border: 1px solid var(--zap-line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px -16px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04);
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--zap-text);
}
.abn-zap-modal.abn-zap-animate {
  animation: zapSlideIn .3s ease-out;
}
@keyframes zapSlideIn {
  from { transform: translateY(24px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ─── Modal head ─── */
.zap-modal-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--zap-line);
  display: flex; align-items: center; gap: 12px;
}
.zap-modal-head .zap-back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--zap-bg-elev2); border: 1px solid var(--zap-line);
  display: grid; place-items: center; cursor: pointer; color: var(--zap-text);
  transition: all .15s ease; flex-shrink: 0;
}
.zap-modal-head .zap-back-btn:hover { border-color: var(--zap-line-strong); }
.zap-modal-head .zap-head-text { flex: 1; }
.zap-modal-head .zap-head-title {
  font-size: 17px; font-weight: 700; color: var(--zap-text); margin: 0;
}
.zap-modal-head .zap-head-sub {
  font-size: 13px; color: var(--zap-text-mute); margin: 2px 0 0;
}
.zap-modal-head .zap-close-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--zap-bg-elev2); border: 1px solid var(--zap-line);
  display: grid; place-items: center; cursor: pointer; color: var(--zap-text-dim);
  transition: all .15s ease; flex-shrink: 0;
}
.zap-modal-head .zap-close-btn:hover { background: #2a1215; border-color: #5c2b2e; color: #ff8a80; }

/* ─── Step rail ─── */
.zap-step-rail { display: flex; gap: 6px; padding: 16px 24px 0; }
.zap-step-pip {
  flex: 1; height: 3px; border-radius: 2px;
  background: var(--zap-line); transition: background .3s ease;
}
.zap-step-pip.done, .zap-step-pip.current { background: var(--zap-orange); }

/* ─── Modal body ─── */
.zap-modal-body { padding: 22px 24px 24px; }

/* ─── Step 0: Amount ─── */
.zap-recipient-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--zap-bg-elev2);
  border-radius: 14px;
  margin-bottom: 18px;
}
.zap-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--zap-orange-soft), var(--zap-orange-deep));
  display: grid; place-items: center;
  color: #150900; font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.zap-recipient-nm { font-size: 14px; font-weight: 600; color: var(--zap-text); }
.zap-recipient-hint { font-size: 12px; color: var(--zap-text-mute); margin-top: 2px; }

.zap-amount-display { text-align: center; margin: 8px 0 0; }
.zap-amount-value {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.zap-amount-value .zap-bolt-icon { color: var(--zap-orange); }
.zap-amount-value .zap-sats-num {
  font-size: 56px; font-weight: 800; letter-spacing: -2px; line-height: 1;
  font-family: 'JetBrains Mono', 'Sora', monospace;
}
.zap-amount-unit {
  font-size: 13px; color: var(--zap-text-mute); text-transform: uppercase;
  letter-spacing: 2px; margin-top: 4px;
}
.zap-amount-fiat {
  font-size: 13px; color: var(--zap-text-mute); margin-top: 2px;
}

/* Preset grid — FIXED overflow */
.zap-preset-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin: 22px 0 16px;
}
.zap-preset {
  height: 60px; border-radius: 12px;
  border: 1px solid var(--zap-line);
  background: var(--zap-bg-elev2);
  color: var(--zap-text);
  font-family: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0; padding: 4px 2px;
  transition: all .12s ease;
  overflow: hidden;
  box-sizing: border-box;
}
.zap-preset .emo { font-size: 16px; line-height: 1.2; }
.zap-preset .pval { font-size: 14px; font-weight: 600; line-height: 1.2; }
.zap-preset .lbl { font-size: 10px; color: var(--zap-text-mute); line-height: 1.2; }
.zap-preset:hover { border-color: var(--zap-line-strong); transform: translateY(-1px); }
.zap-preset.active {
  border-color: var(--zap-orange);
  background: rgba(255,138,31,0.08);
  color: var(--zap-orange);
}

/* Theme override — ONLY for custom amount and note text inputs */
.zap-custom-input input,
.zap-note-row input {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
  border: none !important;
  background: none !important;
  outline: none !important;
  height: auto !important;
  line-height: normal !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
}
.zap-custom-input {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--zap-line);
  border-radius: 12px;
  padding: 0 16px;
  height: 48px;
  margin-bottom: 12px;
  box-sizing: border-box;
}
.zap-custom-input span {
  font-size: 13px; color: var(--zap-text-mute); text-transform: uppercase;
  white-space: nowrap;
}
.zap-custom-input input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--zap-text) !important; font-family: inherit; font-size: 15px !important;
  text-align: right; font-weight: 600;
  width: 60px; min-width: 0;
  -moz-appearance: textfield !important;
}
.zap-custom-input input::-webkit-inner-spin-button,
.zap-custom-input input::-webkit-outer-spin-button {
  -webkit-appearance: none; margin: 0;
}
.zap-custom-input input::placeholder { color: var(--zap-text-mute); }

/* Note row */
.zap-note-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--zap-line);
  border-radius: 12px;
  padding: 0 16px;
  height: 48px;
  margin-bottom: 20px;
  box-sizing: border-box;
}
.zap-note-row .zap-note-icon { color: var(--zap-orange); flex-shrink: 0; display: flex; }
.zap-note-row input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--zap-text) !important; font-family: inherit; font-size: 14px !important;
  min-width: 0;
}
.zap-note-row input::placeholder { color: var(--zap-text-mute); }

.zap-hint {
  font-size: 12px; color: var(--zap-text-mute);
  text-align: center; margin-bottom: 18px;
}

/* ─── Step 1: Payment method ─── */
.zap-method-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.zap-method {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 14px;
  border: 1px solid var(--zap-line);
  background: var(--zap-bg-elev2);
  cursor: pointer; text-align: left;
  color: inherit; font-family: inherit;
  transition: all .15s ease; position: relative;
}
.zap-method:hover { border-color: var(--zap-line-strong); }
.zap-method.active {
  border-color: var(--zap-orange);
  background: rgba(255,138,31,0.08);
}
.zap-method .zap-method-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,138,31,0.12); color: var(--zap-orange);
  flex-shrink: 0;
}
.zap-method .zap-method-info { flex: 1; }
.zap-method .zap-method-name { font-size: 15px; font-weight: 600; }
.zap-method .zap-method-desc { font-size: 12px; color: var(--zap-text-mute); margin-top: 2px; }
.zap-method .zap-method-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; letter-spacing: 0.5px;
}
.zap-method .zap-method-badge.fast { background: rgba(255,138,31,0.15); color: var(--zap-orange); }
.zap-method .zap-method-badge.secure { background: rgba(161,161,170,0.12); color: var(--zap-text-dim); }
.zap-method .zap-method-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--zap-line-strong);
  display: grid; place-items: center; flex-shrink: 0;
}
.zap-method.active .zap-method-radio { border-color: var(--zap-orange); }
.zap-method.active .zap-method-radio::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--zap-orange);
}

.zap-fee-hint {
  font-size: 12px; color: var(--zap-text-mute);
  background: var(--zap-bg-elev2);
  border-radius: 10px; padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}

/* ─── Step 2: QR / Invoice ─── */
.zap-qr-wrap {
  background: var(--zap-bg-elev2);
  border-radius: 16px; padding: 20px;
  margin-bottom: 16px;
}
.zap-qr-frame {
  background: #fff; border-radius: 12px; padding: 20px;
  display: flex; align-items: center; justify-content: center;
  position: relative; min-height: 200px;
}
.zap-qr-frame img { max-width: 100%; }
.zap-qr-frame .zap-qr-center {
  position: absolute;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--zap-orange);
  display: grid; place-items: center;
  box-shadow: 0 0 0 4px #fff;
}
.zap-qr-summary {
  display: flex; justify-content: space-between; padding: 14px 0 0;
}
.zap-qr-summary .zap-qr-label {
  font-size: 11px; color: var(--zap-text-mute);
  text-transform: uppercase; letter-spacing: 1px;
}
.zap-qr-summary .zap-qr-val { font-size: 14px; font-weight: 600; margin-top: 4px; }
.zap-qr-summary .zap-qr-val.orange { color: var(--zap-orange); }

.zap-invoice-row {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--zap-line);
  border-radius: 12px; padding: 12px 14px;
  margin-bottom: 16px;
}
.zap-invoice-row .zap-inv-text {
  flex: 1; font-size: 13px; color: var(--zap-text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}
.zap-invoice-row .zap-copy-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--zap-text); font-family: inherit; font-size: 13px;
  font-weight: 600; padding: 6px 12px; border-radius: 8px;
  transition: background .15s ease; white-space: nowrap;
}
.zap-invoice-row .zap-copy-btn:hover { background: rgba(255,255,255,0.06); }

.zap-waiting {
  text-align: center; font-size: 13px; color: var(--zap-text-mute);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.zap-waiting .zap-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--zap-orange);
  animation: zapPulse 1.5s ease infinite;
}
@keyframes zapPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.zap-waiting .zap-countdown { font-weight: 700; color: var(--zap-text); }

/* ─── Step 3: Success ─── */
.zap-success-wrap { text-align: center; padding: 20px 0; }
.zap-success-ring {
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--zap-orange-soft), var(--zap-orange));
  display: grid; place-items: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 0 6px var(--zap-bg-elev), 0 0 0 8px var(--zap-orange-deep);
  animation: zapSuccessIn .5s ease;
}
@keyframes zapSuccessIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.zap-success-ring svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.zap-success-amount { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.zap-success-msg { font-size: 14px; color: var(--zap-text-mute); line-height: 1.5; }

/* ─── CTA button ─── */
.zap-cta-btn {
  width: 100%; height: 52px; border-radius: 999px;
  background: var(--zap-orange);
  color: #000; font-family: inherit; font-weight: 700;
  font-size: 15px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .15s ease; margin-top: 4px;
}
.zap-cta-btn:hover { background: var(--zap-orange-soft); transform: translateY(-1px); }
.zap-cta-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── In-article CTA ─── */
.abn-zap-cta {
  margin: 40px 0 24px;
  border-radius: 16px;
  border: 1px solid var(--zap-line);
  background: linear-gradient(135deg, var(--zap-bg-elev) 0%, var(--zap-bg-elev2) 100%);
  padding: 28px 32px;
}
.abn-zap-cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.abn-zap-cta-label {
  display: block; font-size: 12px; font-weight: 700; color: var(--zap-orange);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px;
}
.abn-zap-cta-title { display: block; font-size: 20px; font-weight: 800; color: var(--zap-text); margin-bottom: 4px; }
.abn-zap-cta-desc { display: block; font-size: 14px; color: var(--zap-text-mute); }

/* Cream pill button */
.abn-zap-btn-pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--zap-cream); color: #1a0d00;
  font-family: inherit; font-weight: 700; font-size: 15px;
  border: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
}
.abn-zap-btn-pill:hover {
  background: var(--zap-cream-soft);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px var(--zap-cream-glow);
}
.abn-zap-btn-pill svg { flex-shrink: 0; }

/* ─── Floating zap PILL button (matches designer spec) ─── */
.abn-zap-float {
  position: fixed; bottom: 80px; right: 24px; z-index: 99990;
  height: 52px; padding: 0 24px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--zap-cream); color: #1a0d00;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700; font-size: 15px;
  border: none; border-radius: 999px; cursor: pointer;
  box-shadow: 0 18px 40px -14px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease;
}
.abn-zap-float:hover {
  transform: translateY(-3px);
  background: var(--zap-cream-soft);
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.6), 0 0 24px var(--zap-cream-glow);
}
.abn-zap-float svg { flex-shrink: 0; }

/* ─── Loading spinner ─── */
.zap-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--zap-line);
  border-top-color: var(--zap-orange);
  border-radius: 50%;
  animation: zapSpin .6s linear infinite;
  margin: 40px auto;
}
@keyframes zapSpin { to { transform: rotate(360deg); } }

/* ─── Toast notification ─── */
.zap-toast {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: 14px 20px;
  border-radius: 20px 20px 0 0;
  display: flex; align-items: flex-start; gap: 10px;
  animation: zapToastIn .3s ease-out;
  font-size: 13px; line-height: 1.5;
}
.zap-toast.error {
  background: linear-gradient(135deg, #2a1215 0%, #1b1b1f 100%);
  border-bottom: 1px solid rgba(255,80,80,0.2);
  color: #ff8a80;
}
.zap-toast.warn {
  background: linear-gradient(135deg, #2a1a08 0%, #1b1b1f 100%);
  border-bottom: 1px solid rgba(255,138,31,0.2);
  color: var(--zap-orange);
}
.zap-toast .zap-toast-icon { flex-shrink: 0; margin-top: 1px; }
.zap-toast .zap-toast-msg { flex: 1; }
.zap-toast .zap-toast-close {
  flex-shrink: 0; cursor: pointer; opacity: 0.5;
  background: none; border: none; color: inherit; padding: 0;
}
.zap-toast .zap-toast-close:hover { opacity: 1; }
@keyframes zapToastIn {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes zapToastOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-100%); opacity: 0; }
}

/* ─── Mobile ─── */
@media (max-width: 480px) {
  .abn-zap-modal { border-radius: 16px; }
  .abn-zap-cta-inner { flex-direction: column; align-items: flex-start; }
  .abn-zap-btn-pill { width: 100%; justify-content: center; }
  .zap-amount-value .zap-sats-num { font-size: 40px; }
  .zap-preset-row { gap: 6px; }
  .zap-preset { height: 54px; font-size: 13px; }
  .abn-zap-float { bottom: 70px; right: 16px; height: 48px; padding: 0 20px; font-size: 14px; }
}
