/* ================================================================
   Ziflyn Checkout Form — mobile-first, scoped to .zifn-wrap only
   8px rhythm · Inter (enqueued in PHP, not @import)
   ================================================================ */

.zifn-wrap {
  /* Design tokens (scoped — no :root leak) · tuned to match classic Ziflyn checkout */
  --zifn-radius: 12px;
  --zifn-radius-sm: 8px;
  --zifn-space: 8px;
  --zifn-accent: var(--df-accent, #6B8E23);
  --zifn-accent-2: var(--df-accent2, #8AAE2A);
  --zifn-accent-h: var(--df-accent-h, #556B2F);
  --zifn-accent-rgb: var(--df-accent-rgb, 107, 142, 35);
  --zifn-success: var(--df-success, #059669);
  --zifn-error: var(--df-error, #b91c1c);
  --zifn-error-bg: #fef2f2;
  --zifn-error-border: #fecaca;
  --zifn-text: #111827;
  --zifn-muted: #6b7280;
  --zifn-border: #e4e7f0;
  --zifn-bg: #f7f8fc;
  --zifn-shadow: 0 4px 24px rgba(0,0,0,.07);
  --zifn-shadow-sm: 0 2px 12px rgba(0,0,0,.06);
  --zifn-touch: 44px;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--zifn-text);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  /* Match classic checkout spacing; bottom for thumb / safe area */
  padding: 40px 36px max(32px, env(safe-area-inset-bottom, 0px));
  background: transparent;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  font-size: 16px;
  line-height: 1.5;
}

.zifn-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--zifn-accent), var(--zifn-accent-2));
  border-radius: 20px 20px 0 0;
}
.zifn-wrap *,
.zifn-wrap *::before,
.zifn-wrap *::after { box-sizing: border-box; }

/* ── Global inline errors (replaces alert) ── */
.zifn-global-err {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--zifn-space) * 1.5);
  margin: 0 0 calc(var(--zifn-space) * 2);
  padding: calc(var(--zifn-space) * 1.75) calc(var(--zifn-space) * 2);
  border-radius: var(--zifn-radius-sm);
  border: 1px solid var(--zifn-error-border);
  background: var(--zifn-error-bg);
  color: var(--zifn-error);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  outline: none;
}
.zifn-global-err--info {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(239, 246, 255, 0.95);
  color: #1e3a8a;
}
.zifn-global-err:empty,
.zifn-global-err[hidden] {
  display: none !important;
}

/* Panel: global checkout pause */
.zifn-payments-off-notice {
  margin: 0 0 calc(var(--zifn-space) * 2.5);
  padding: calc(var(--zifn-space) * 1.75) calc(var(--zifn-space) * 2);
  border-radius: var(--zifn-radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: rgba(254, 243, 199, 0.92);
  color: #78350f;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.zifn-wrap--payments-unavailable .zifn-step-title { margin-top: 0; }
.zifn-wa-wrap--solo { margin-top: var(--zifn-space); }
.zifn-payments-off-no-wa {
  margin: calc(var(--zifn-space) * 1.5) 0 0;
  font-size: 0.875rem;
  color: var(--zifn-muted);
  line-height: 1.5;
}

.zifn-hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.zifn-hp label { position: absolute; left: -9999px; }

/* ── Progress (classic layout: centered, no step “pop” scale) ── */
.zifn-progress {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  gap: 0;
}
.zifn-ps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0.35;
  transition: opacity 0.3s;
  min-width: 0;
}
.zifn-ps.active, .zifn-ps.done { opacity: 1; }
.zifn-pn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 2px solid var(--zifn-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--zifn-muted);
  transition: all 0.3s;
}
.zifn-ps.active .zifn-pn {
  background: var(--zifn-accent);
  border-color: var(--zifn-accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--zifn-accent-rgb), 0.15);
}
.zifn-ps.done .zifn-pn {
  background: var(--zifn-success);
  border-color: var(--zifn-success);
  color: #fff;
}
.zifn-pl {
  font-size: 11px;
  color: var(--zifn-muted);
  text-align: center;
  line-height: 1.2;
  max-width: 100px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.zifn-ps.active .zifn-pl { color: var(--zifn-accent); font-weight: 700; }
.zifn-ps.done .zifn-pl   { color: var(--zifn-success); }
.zifn-pline {
  flex: 1;
  height: 2px;
  background: var(--zifn-border);
  margin: 0 8px 20px;
  max-width: 56px;
  min-width: 12px;
  border-radius: 2px;
  align-self: center;
  transition: background 0.3s ease;
}
.zifn-ps.done + .zifn-pline { background: linear-gradient(90deg, var(--zifn-success) 0 50%, var(--zifn-border) 50% 100%); }

/* CRO Phase 2: Amount box above fold */
.zifn-amount-box--top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--zifn-surface);
  border: 1px solid var(--zifn-border);
  border-radius: var(--zifn-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

/* CRO Phase 2: Payment method badges */
.zifn-method-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.zifn-method-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--zifn-surface);
  border: 1px solid var(--zifn-border);
  color: var(--zifn-muted);
}

/* CRO Phase 2: Process explainer */
.zifn-process-hint {
  font-size: 12px;
  color: var(--zifn-muted);
  text-align: center;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}
.zifn-wrap--step1-done .zifn-process-hint { display: none; }

/* CRO Phase 3: Upload zone pulse animation on tab return */
@keyframes zifn-upload-pulse {
  0%   { border-color: var(--zifn-accent); box-shadow: 0 0 0 3px rgba(107,142,35,0.15); }
  50%  { border-color: var(--zifn-accent); box-shadow: 0 0 0 6px rgba(107,142,35,0.08); }
  100% { border-color: var(--zifn-border);  box-shadow: none; }
}
.zifn-file-drop--highlight {
  animation: zifn-upload-pulse 2s ease-out forwards;
}

/* CRO Phase 3: Payment method microcopy */
.zifn-pay-microcopy {
  font-size: 12px;
  color: var(--zifn-muted);
  margin: 6px 0 12px;
  padding: 0 0 0 2px;
  line-height: 1.55;
  max-width: 100%;
  word-wrap: break-word;
}
@media (min-width: 400px) {
  .zifn-pay-microcopy { font-size: 12.5px; }
}

/* CRO Phase 3: Upload trust line */
.zifn-upload-trust {
  font-size: 11px;
  color: var(--zifn-muted);
  margin: 8px 0 0;
  text-align: center;
}

/* CRO Phase 3: Mobile upload link */
.zifn-mobile-upload-hint {
  font-size: 12px;
  color: var(--zifn-muted);
  margin: 6px 0 0;
  text-align: center;
}

/* Step shell + bottom space for sticky CTA */
.zifn-step {
  padding-bottom: calc(var(--zifn-space) * 2);
  scroll-margin-top: calc(var(--zifn-space) * 2);
  transition: opacity 0.22s ease, transform 0.22s ease;
  will-change: opacity;
}
.zifn-wrap--is-transitioning { pointer-events: none; }

.zifn-step-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--zifn-text);
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
  outline: none;
}

/* Card sections */
.zifn-step-card {
  background: #fff;
  border: 1px solid var(--zifn-border);
  border-radius: var(--zifn-radius);
  padding: 18px 10px;
  margin-bottom: 18px;
  box-shadow: var(--zifn-shadow);
}
.zifn-step-card--tight { padding: 18px 10px; margin-bottom: 18px; }

/* ── Form fields ── */
.zifn-fg { margin-bottom: 18px; }
.zifn-fg:last-of-type { margin-bottom: 0; }
.zifn-fg label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--zifn-muted);
  margin-bottom: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.zifn-req { color: var(--zifn-accent); }
.zifn-fg .zifn-err:empty { min-height: 0; }
.zifn-err--block { display: block; width: 100%; margin-top: var(--zifn-space); }

.zifn-fg input[type="text"],
.zifn-fg input[type="email"],
.zifn-fg input[type="tel"] {
  width: 100%;
  background: var(--zifn-bg);
  border: 1.5px solid var(--zifn-border);
  border-radius: var(--zifn-radius);
  padding: 12px 15px;
  color: var(--zifn-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;
}
/* iOS: avoid focus zoom in Safari */
@media (max-width: 560px) {
  .zifn-fg input[type="text"],
  .zifn-fg input[type="email"],
  .zifn-fg input[type="tel"] {
    font-size: 16px;
  }
}
.zifn-fg input::placeholder { color: #c4c9d9; }
.zifn-fg input:hover:not(:disabled):not([aria-invalid="true"]) { border-color: #d1d5db; }
.zifn-fg input:focus {
  outline: none;
  border-color: var(--zifn-accent);
  box-shadow: 0 0 0 3px rgba(var(--zifn-accent-rgb), 0.1);
  background: #fff;
}
.zifn-fg input[aria-invalid="true"],
.zifn-fg .zifn-file-drop.zifn-input--invalid {
  border-color: var(--zifn-error);
  background: #fff;
  box-shadow: 0 0 0 1px var(--zifn-error-border);
}
.zifn-fg input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f3f4f6;
}

.zifn-err {
  display: block;
  color: var(--zifn-error);
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  min-height: 15px;
}
.zifn-err:not(:empty) { min-height: 1.2em; }

/* ── Sticky CTA (thumb zone) — same horizontal rhythm as .zifn-wrap, no “floating” bar on small screens ── */
.zifn-sticky-cta {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: calc(var(--zifn-space) * 1.5) 0 0;
  padding: 0 0 max(6px, env(safe-area-inset-bottom, 0px));
  background: transparent;
  border: none;
  box-shadow: none;
}
@media (min-width: 768px) {
  .zifn-sticky-cta {
    position: static;
    margin: calc(var(--zifn-space) * 2) 0 0;
    padding: 0;
  }
}

/* ── Buttons: classic row, end-aligned (full width only in sticky @ small screens) ── */
.zifn-btn-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin-top: 22px;
}
.zifn-btn-row--split {
  justify-content: flex-end;
}
.zifn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  min-width: 0;
  width: auto;
  padding: 0 24px;
  border-radius: 50px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.22s, transform 0.18s, opacity 0.2s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.zifn-sticky-cta .zifn-btn-row { margin-top: 22px; }
.zifn-sticky-cta .zifn-btn-row--split .zifn-btn { flex: 1 1 calc(50% - var(--zifn-space)); width: auto; }
.zifn-btn-primary {
  background: linear-gradient(135deg, var(--zifn-accent), var(--zifn-accent-h));
  color: var(--df-primary-btn-text, #1a1a1a) !important;
  box-shadow: 0 4px 16px rgba(var(--zifn-accent-rgb), 0.35);
}
.zifn-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(var(--zifn-accent-rgb), 0.45);
}
.zifn-btn-primary:active:not(:disabled) { transform: translateY(0); }
.zifn-btn-secondary { background: #f3f4f6; color: var(--zifn-text) !important; border-radius: 50px; }
.zifn-btn-secondary:hover:not(:disabled) { background: #e9ebf0; }
.zifn-btn:disabled, .zifn-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}
.zifn-btn.zifn-btn--loading { position: relative; color: transparent !important; }
.zifn-btn.zifn-btn--loading::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: #111;
  border-radius: 50%;
  animation: zifn-spin 0.75s linear infinite;
}
.zifn-btn-primary.zifn-btn--loading::after {
  border-top-color: var(--df-primary-btn-text, #1a1a1a);
}
.zifn-btn-secondary.zifn-btn--loading::after {
  border-top-color: #374151;
}
@keyframes zifn-spin { to { transform: rotate(360deg); } }

/* Amount */
.zifn-amount-box {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--zifn-border);
  border-radius: 0;
  padding: 0 0 18px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  margin: 0 0 18px;
}
@media (min-width: 480px) {
  .zifn-amount-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.zifn-amount-label { font-size: 13px; color: var(--zifn-muted); font-weight: 600; margin-bottom: 2px; }
.zifn-amount-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--zifn-accent), var(--zifn-accent-h));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 0.05em;
}
.zifn-amount-val { font-size: 30px; font-weight: 800; color: var(--zifn-accent); line-height: 1.2; }

/* Payment method cards */
.zifn-pay-label { font-size: 12px; font-weight: 700; color: var(--zifn-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 10px; }
.zifn-pay-methods {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.5vw, 14px);
  margin-bottom: 0;
}
@media (min-width: 600px) {
  .zifn-pay-methods { gap: 14px; }
}
.zifn-pay-loading {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--zifn-space) * 1.5);
  padding: calc(var(--zifn-space) * 2.5) calc(var(--zifn-space) * 2);
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}
.zifn-pay-loading__txt { line-height: 1.4; }
.zifn-pay-card {
  --zifn-pay-pad: clamp(12px, 3.5vw, 16px);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  min-height: 4.5rem;
  padding: var(--zifn-pay-pad) calc(var(--zifn-pay-pad) + 2px);
  border: 2px solid var(--zifn-border);
  border-radius: var(--zifn-radius, 12px);
  background: var(--zifn-bg);
  text-decoration: none;
  color: var(--zifn-text);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.16s;
  cursor: pointer;
}
.zifn-pay-card:hover { border-color: var(--zifn-accent); background: #fff; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07); transform: translateY(-1px); text-decoration: none; color: var(--zifn-text); }
/* Method-specific hovers (override generic border) */
.zifn-pay-paypal.zifn-pay-card:hover { border-color: #003087; }
.zifn-pay-paddle.zifn-pay-card:hover { border-color: #2563eb; }
.zifn-pay-crypto.zifn-pay-card:hover { border-color: #7c3aed; box-shadow: 0 4px 20px rgba(124, 58, 237, 0.1); }
.zifn-pay-card:active { transform: translateY(0); }
.zifn-pay-card:focus-visible { outline: 2px solid var(--zifn-accent); outline-offset: 3px; }
.zifn-pay-left {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  gap: 0.5rem;
  justify-content: center;
  align-self: center;
  padding: 1px 0;
}
/* Title: icon + label (all methods) */
.zifn-pay-title--row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: 0.5rem;
  row-gap: 0.2rem;
}
.zifn-pay-title-text {
  flex: 1 1 7rem;
  min-width: 0;
  font-size: clamp(0.8rem, 1.1vw + 0.6rem, 0.95rem);
  line-height: 1.4;
  font-weight: 700;
}
.zifn-paypal-icon-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
  line-height: 0;
}
/* PayPal bicolor mark in title */
.zifn-paypal-icon-wrap .zifn-paypal-wordmark {
  display: block;
  width: clamp(22px, 3vw, 28px);
  height: clamp(22px, 3vw, 28px);
}
.zifn-pay-crypto__title { color: #5b21b6; }
.zifn-pay-icon { width: 1.2rem; height: 1.2rem; min-width: 1.2rem; min-height: 1.2rem; color: var(--zifn-accent); flex-shrink: 0; margin-top: 0.1rem; }
.zifn-pay-icon.zifn-pay-crypto-ico { color: #7c3aed; }
/* Paddle / card (Stripe) — neutral rail */
.zifn-pay-paddle { border-color: #dfe3ee; background: #fafbfe; }
.zifn-pay-paddle.zifn-pay-card:hover { box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1); }
/* Logo strip */
.zifn-pay-logos { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.55rem; min-height: 1.35rem; }
.zifn-pay-apple {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  background: #000;
  border-radius: 3px;
  padding: 0.22rem 0.35rem 0.22rem 0.2rem;
}
.zifn-pay-gpay {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 700;
  color: #5f6368;
  background: #fff;
  border: 1px solid #d2d6e0;
  border-radius: 3px;
  padding: 0.18rem 0.4rem 0.18rem 0.3rem;
}
.zifn-pay-visa, .zifn-pay-mc { flex-shrink: 0; }

.zifn-pay-arrow {
  font-size: 1.15rem;
  line-height: 1;
  color: var(--zifn-accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.15rem;
  align-self: center;
  transition: transform 0.18s;
}
.zifn-pay-card:hover .zifn-pay-arrow { transform: translateX(4px); }
.zifn-pay-card.zifn-pay-selected .zifn-pay-arrow { transform: translateX(4px); }

.zifn-pay-paypal { border-color: #b5d0ee; background: linear-gradient(180deg, #f5f9ff 0%, #e8f2fd 100%); }
.zifn-pay-paypal.zifn-pay-card:hover { box-shadow: 0 4px 20px rgba(0, 48, 135, 0.1); }
.zifn-pay-paypal .zifn-pay-title-text, .zifn-pay-paypal .zifn-pay-title--row { color: #003087; }
.zifn-pay-paypal .zifn-pay-arrow { color: #009cde; }
.zifn-pay-paypal.zifn-pay-selected {
  border-color: #003087 !important;
  background: #fff !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(0, 48, 135, 0.2) !important;
}

.zifn-pay-crypto { border-color: #e0d0fa; background: linear-gradient(180deg, #fdfcff 0%, #faf5ff 100%); }
.zifn-pay-crypto:hover { border-color: #7c3aed; box-shadow: 0 4px 20px rgba(124, 58, 237, 0.1); }
.zifn-pay-crypto .zifn-pay-arrow { color: #7c3aed; }
.zifn-pay-crypto.zifn-pay-selected {
  border-color: #6d28d9 !important;
  background: #fff !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(109, 40, 217, 0.18) !important;
}

/* Default (Paddle) selected — site accent */
.zifn-pay-card.zifn-pay-selected:not(.zifn-pay-paypal):not(.zifn-pay-crypto) {
  border-color: var(--zifn-accent) !important;
  background: #fff !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(var(--zifn-accent-rgb), 0.18) !important;
}

/* Legacy: title line without --row (empty) */
.zifn-pay-title { display: flex; align-items: center; gap: 7px; font-size: 0.9rem; font-weight: 700; }
.zifn-crypto-badge { display: inline-flex; align-items: center; padding: 0.2rem 0.45rem; border-radius: 99px; font-size: 0.65rem; font-weight: 700; line-height: 1.2; }
@media (min-width: 400px) {
  .zifn-crypto-badge { font-size: 0.6875rem; padding: 0.2rem 0.5rem; }
}
.zifn-btc  { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.zifn-eth  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.zifn-usdt { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.zifn-more { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.zifn-pay-hint { font-size: 12px; color: var(--zifn-muted); line-height: 1.5; text-align: center; margin: 6px 0 18px; }

/* Pay methods error + retry */
.zifn-pay-err {
  border-radius: var(--zifn-radius-sm);
  border: 1px solid var(--zifn-error-border);
  background: var(--zifn-error-bg);
  color: var(--zifn-error);
  padding: calc(var(--zifn-space) * 2);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: 0;
}
.zifn-pay-err p, .zifn-pay-err__msg { margin: 0 0 var(--zifn-space); }
.zifn-pay-err--warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #78350f;
}
.zifn-pay-err__actions { display: flex; flex-direction: column; gap: var(--zifn-space); margin-top: calc(var(--zifn-space) * 1.5); }
.zifn-btn-ghost {
  min-height: var(--zifn-touch);
  width: 100%;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--zifn-radius-sm);
  border: 1px solid var(--zifn-border);
  background: #fff;
  color: var(--zifn-text) !important;
  cursor: pointer;
  padding: 0 14px;
  transition: background 0.15s, border-color 0.15s;
}
.zifn-btn-ghost:hover:not(:disabled) { background: #f9fafb; border-color: #d1d5db; }
.zifn-btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }
.zifn-btn-ghost--accent { border-color: var(--zifn-accent); color: #1a1a1a !important; background: #fff5ee; }

/* File */
.zifn-fg--proof { margin-top: 0; }
.zifn-file-drop {
  position: relative;
  border: 2px dashed var(--zifn-border);
  border-radius: var(--zifn-radius);
  min-height: 100px;
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--zifn-bg);
}
.zifn-file-drop:hover, .zifn-file-drop.dragover { border-color: var(--zifn-accent); background: #fff5ee; }
.zifn-file-drop:focus-within { outline: 2px solid var(--zifn-accent); outline-offset: 2px; }
.zifn-file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.zifn-file-label { display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none; }
.zifn-file-icon { font-size: 26px; line-height: 1; }
.zifn-file-name { font-size: 13px; color: var(--zifn-muted); }
.zifn-file-hint { display: block; font-size: 0.75rem; color: #6b7280; margin-top: var(--zifn-space); text-align: center; }
.zifn-preview-wrap { margin-top: var(--zifn-space); border: 1.5px solid var(--zifn-success); border-radius: var(--zifn-radius-sm); overflow: hidden; background: #ecfdf5; }
.zifn-preview-img { width: 100%; max-height: 220px; object-fit: contain; display: block; padding: var(--zifn-space); }
.zifn-preview-remove {
  display: block; width: 100%;
  min-height: var(--zifn-touch);
  background: #fee2e2;
  border: none;
  border-top: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.zifn-preview-remove:hover, .zifn-preview-remove:focus-visible { background: #fecaca; outline: none; }
.zifn-preview-remove:focus-visible { box-shadow: inset 0 0 0 2px var(--zifn-accent); }

/* Summary */
.zifn-step-card .zifn-summary {
  background: var(--zifn-bg);
  border: 1px solid var(--zifn-border);
  border-radius: var(--zifn-radius-sm);
  padding: 16px 18px;
  margin: 0;
}
.zifn-summary { padding: 0; margin: 0; border: none; background: transparent; }
.zifn-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--zifn-space);
  padding: 8px 0;
  border-bottom: 1px solid var(--zifn-border);
  font-size: 13px;
}
.zifn-summary-row:last-child { border-bottom: none; }
.zifn-summary-row span:first-child { color: var(--zifn-muted); flex: 0 1 42%; }
.zifn-summary-row span:last-child  { font-weight: 600; color: var(--zifn-text); text-align: right; word-break: break-word; }

/* Spinner */
.zifn-spinner { width: 48px; height: 48px; border: 3px solid var(--zifn-border); border-top-color: var(--zifn-accent); border-radius: 50%; animation: zifn-spin 1s linear infinite; margin: 0 auto; }
.zifn-spinner--sm { width: 32px; height: 32px; border-width: 2.5px; }
.zifn-waiting, .zifn-success { text-align: center; padding: 16px 0; }
.zifn-success-countdown {
  margin-top: 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--zifn-muted, #4b5563);
  letter-spacing: 0.02em;
}
.zifn-success-icon { width: 70px; height: 70px; background: linear-gradient(135deg, #059669, #047857); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; color: #fff; margin: 0 auto 20px; box-shadow: 0 0 0 8px rgba(5, 150, 105, 0.12); animation: zifn-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes zifn-pop { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.zifn-wa-wrap { margin-top: calc(var(--zifn-space) * 3); padding-top: calc(var(--zifn-space) * 2.5); border-top: 1.5px dashed #e4e7f0; position: relative; }
.zifn-wa-wrap::before {
  content: '— Hilfe benötigt? —';
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  background: transparent;
  padding: 0 10px;
  font-size: 0.625rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.08em;
}
.zifn-wa-btn {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 48px;
  text-decoration: none;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  box-shadow: 0 2px 12px rgba(37, 211, 102, 0.1);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  overflow: hidden;
}
.zifn-wa-btn:hover, .zifn-wa-btn:focus-visible {
  text-decoration: none;
  border-color: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.18);
}
.zifn-wa-icon-col { flex-shrink: 0; width: 60px; display: flex; align-items: center; justify-content: center; background: #dcfce7; border-right: 1px solid #bbf7d0; }
.zifn-wa-ring { width: 40px; height: 40px; border-radius: 50%; background: #25d366; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35); animation: zifn-wa-pulse 2.5s ease-in-out infinite; }
@keyframes zifn-wa-pulse { 0%, 100% { box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3); } 50% { box-shadow: 0 2px 18px rgba(37, 211, 102, 0.5); } }
.zifn-wa-text { flex: 1; padding: 10px 12px; min-width: 0; }
.zifn-wa-label { font-size: 0.875rem; font-weight: 700; color: #14532d; }
.zifn-wa-desc  { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 0.75rem; color: #6b7280; }
.zifn-wa-dot   { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; flex-shrink: 0; }
.zifn-wa-cta   { flex-shrink: 0; margin: 0 8px 0 0; align-self: center; background: #16a34a; color: #fff !important; font-size: 12px; font-weight: 700; padding: 7px 13px; border-radius: 7px; white-space: nowrap; }

.ziflyn-mac-wrap { display: flex; gap: var(--zifn-space); }

/* ── Mobile: primary CTA + WhatsApp card ── */
@media (max-width: 767px) {
  .zifn-sticky-cta .zifn-btn-row {
    width: 100%;
    min-width: 0;
  }
  .zifn-sticky-cta .zifn-btn {
    max-width: 100%;
  }
  .zifn-sticky-cta .zifn-btn-primary {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 0.9375rem;
    line-height: 1.3;
    white-space: normal;
    text-align: center;
    word-break: break-word;
    hyphens: auto;
  }
  .zifn-sticky-cta .zifn-btn-row--split {
    flex-direction: column;
  }
  .zifn-sticky-cta .zifn-btn-row--split .zifn-btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .zifn-wa-btn {
    flex-wrap: wrap;
    align-items: stretch;
  }
  .zifn-wa-icon-col {
    width: 52px;
    min-height: 72px;
  }
  .zifn-wa-text {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 10px 10px 0;
  }
  .zifn-wa-cta {
    flex: 1 1 100%;
    align-self: stretch;
    margin: 0;
    padding: 12px 14px;
    text-align: center;
    font-size: 0.875rem;
    border-radius: 0 6 calc(var(--zifn-radius-sm) - 1px) calc(var(--zifn-radius-sm) - 1px);
    border-top: 1px solid #bbf7d0;
  }
  .zifn-wa-label {
    font-size: 0.8125rem;
  }
  .zifn-wa-desc {
    font-size: 0.6875rem;
  }
}

/* Desktop: comfortable margins (reference checkout) */
@media (min-width: 768px) {
  .zifn-wrap { padding: 40px 10px 48px; }
  .zifn-btn-row { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
  .zifn-btn-row .zifn-btn { width: auto; }
  .zifn-btn-row .zifn-btn-primary { min-width: 200px; }
  .zifn-sticky-cta .zifn-btn-row--split { flex-direction: row; }
  .zifn-sticky-cta .zifn-btn-row--split .zifn-btn { width: auto; }
}

@media (max-width: 560px) {
  .zifn-wrap { padding: 24px 1px max(20px, env(safe-area-inset-bottom, 0px)); border-radius: 12px; }
  .zifn-wrap::before { border-radius: 12px 12px 0 0; }
  .zifn-amount-val { font-size: 24px; }
  .zifn-step-title { font-size: 16px; }
}

/* Smart sticky: context + trust — extra frame only ≥768px (see media query below) */
.zifn-sticky-cta__context {
  margin-bottom: calc(var(--zifn-space) * 1.5);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--zifn-text);
}
.zifn-sticky-ctx__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--zifn-space);
  font-weight: 600;
  margin-bottom: 4px;
}
.zifn-sticky-ctx__k { color: var(--zifn-muted); font-weight: 600; }
.zifn-sticky-ctx__v { text-align: right; font-weight: 700; color: var(--zifn-text); }
.zifn-sticky-ctx__v--total { color: var(--zifn-accent); font-size: 1.125rem; }
.zifn-sticky-ctx__hint,
.zifn-sticky-ctx__method {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.4;
}
.zifn-sticky-ctx__method { margin-top: 4px; color: #374151; }
.zifn-sticky-cta__trust {
  margin: 0 0 calc(var(--zifn-space) * 1.5);
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}
.zifn-sticky-cta__lock { font-size: 0.9rem; opacity: 0.85; }
@media (min-width: 768px) {
  .zifn-sticky-cta--smart {
    margin-top: calc(var(--zifn-space) * 1.5);
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
  }
  .zifn-sticky-cta--smart .zifn-sticky-cta__trust { margin-bottom: 12px; }
}

/* Inline validation: success (not only color) */
.zifn-field-ok {
  display: block;
  font-size: 0.8125rem;
  color: #047857;
  font-weight: 600;
  margin-top: 6px;
}
.zifn-field-ok:empty, .zifn-field-ok[hidden] { display: none !important; }
.zifn-fg--valid input[type="text"],
.zifn-fg--valid input[type="email"],
.zifn-fg--valid input[type="tel"] {
  border-color: #6ee7b7;
  background: #f0fdf4;
  box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.25);
}
.zifn-fg--valid input:focus {
  border-color: var(--zifn-success);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
  background: #fff;
}

/* Payment: guided loading + empty */
.zifn-pay-loading__lead {
  margin: 0 0 4px 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #4b5563;
  line-height: 1.4;
  max-width: 22rem;
}
.zifn-pay-loading__sub { font-size: 0.8125rem; color: #9ca3af; }
.zifn-pay-loading__slow {
  margin: calc(var(--zifn-space) * 1.25) 0 0;
  font-size: 0.8125rem;
  color: #b45309;
  max-width: 22rem;
  line-height: 1.45;
}
.zifn-pay-loading--taking-long .zifn-pay-spinner { opacity: 0.75; }
.zifn-pay-empty {
  text-align: center;
  padding: calc(var(--zifn-space) * 3) calc(var(--zifn-space) * 2);
  border: 1px dashed var(--zifn-border);
  border-radius: var(--zifn-radius);
  background: #fafafa;
  color: #4b5563;
}
.zifn-pay-empty__icon { font-size: 1.75rem; line-height: 1.3; margin-bottom: var(--zifn-space); opacity: 0.85; }
.zifn-pay-empty__title { margin: 0 0 6px; font-size: 0.95rem; font-weight: 700; color: #111; }
.zifn-pay-empty__hint { margin: 0; font-size: 0.8125rem; line-height: 1.5; color: #6b7280; }

/* ── Upload nudge (shown after payment link clicked, hidden once file uploaded) ── */
.zifn-upload-nudge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  padding: 11px 16px;
  border-radius: var(--zifn-radius-sm);
  background: #fff7ed;
  border: 1.5px solid rgba(var(--zifn-accent-rgb), 0.35);
  color: #92400e;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  animation: zifn-nudge-in 0.3s ease;
}
.zifn-upload-nudge[hidden] { display: none !important; }
.zifn-upload-nudge__arrow {
  font-size: 1.1rem;
  color: var(--zifn-accent);
  flex-shrink: 0;
  animation: zifn-bounce-y 1.4s ease-in-out infinite;
}
@keyframes zifn-nudge-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes zifn-bounce-y {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

/* Pulse ring on upload zone when user returns to tab without file */
.zifn-file-drop--pulse {
  animation: zifn-upload-pulse 0.9s ease 2;
}
@keyframes zifn-upload-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(var(--zifn-accent-rgb), 0.55); border-color: var(--zifn-accent); }
  60%  { box-shadow: 0 0 0 8px rgba(var(--zifn-accent-rgb), 0);    border-color: var(--zifn-accent); }
  100% { box-shadow: 0 0 0 0   rgba(var(--zifn-accent-rgb), 0);    border-color: var(--zifn-border); }
}

/* RTL checkout (optional): body.zfp-checkout-rtl — reserved for future use. */
body.zfp-checkout-rtl .zifn-wrap,
.zfp-checkout-rtl .zifn-wrap {
  direction: rtl;
  text-align: right;
}
body.zfp-checkout-rtl .zifn-wrap .zifn-row,
body.zfp-checkout-rtl .zifn-wrap .zifn-field-h,
body.zfp-checkout-rtl .zifn-wrap .zifn-pay-grid {
  direction: rtl;
}
body.zfp-checkout-rtl .zifn-wrap label,
body.zfp-checkout-rtl .zifn-wrap input,
body.zfp-checkout-rtl .zifn-wrap select,
body.zfp-checkout-rtl .zifn-wrap textarea,
.zfp-checkout-rtl .zifn-wrap label,
.zfp-checkout-rtl .zifn-wrap input,
.zfp-checkout-rtl .zifn-wrap select,
.zfp-checkout-rtl .zifn-wrap textarea {
  text-align: right;
}
body.zfp-checkout-rtl .zifn-wrap .zifn-btn,
body.zfp-checkout-rtl .zifn-wrap button,
.zfp-checkout-rtl .zifn-wrap .zifn-btn,
.zfp-checkout-rtl .zifn-wrap button {
  direction: rtl;
}

/* RTL layout polish: flex rows, field groups, action rows */
body.zfp-checkout-rtl .zifn-wrap .zifn-row,
.zfp-checkout-rtl .zifn-wrap .zifn-row,
body.zfp-checkout-rtl .zifn-wrap .zifn-summary-row,
.zfp-checkout-rtl .zifn-wrap .zifn-summary-row {
  flex-direction: row-reverse;
}
body.zfp-checkout-rtl .zifn-wrap .zifn-fg,
body.zfp-checkout-rtl .zifn-wrap .zifn-field,
.zfp-checkout-rtl .zifn-wrap .zifn-fg,
.zfp-checkout-rtl .zifn-wrap .zifn-field {
  text-align: right;
}
body.zfp-checkout-rtl .zifn-wrap .zifn-btn-row,
body.zfp-checkout-rtl .zifn-wrap .zifn-actions,
.zfp-checkout-rtl .zifn-wrap .zifn-btn-row,
.zfp-checkout-rtl .zifn-wrap .zifn-actions {
  justify-content: flex-start;
}
body.zfp-checkout-rtl .zifn-wrap .zifn-summary-row span:first-child,
.zfp-checkout-rtl .zifn-wrap .zifn-summary-row span:first-child {
  text-align: right;
}
/* Value column: LTR + isolate for € / digits in RTL contexts */
body.zfp-checkout-rtl .zifn-wrap .zifn-summary-row span:last-child,
.zfp-checkout-rtl .zifn-wrap .zifn-summary-row span:last-child {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}
