/* ================================================================
   Ziflyn Checkout Form — front-end styles
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --df-accent:    #ff6600;
  --df-accent-rgb: 255,102,0; /* used for rgba() shadows */
  --df-accent-h:  #e55a00;
  --df-accent2:   #ff8533;
  --df-success:   #059669;
  --df-error:     #ef4444;
  --df-text:      #111827;
  --df-muted:     #6b7280;
  --df-border:    #e4e7f0;
  --df-bg:        #f7f8fc;
  --df-radius:    12px;
  --df-shadow:    0 4px 24px rgba(0,0,0,.07);
}

.zifn-wrap {
  font-family: 'Inter', -apple-system, sans-serif;
  border-radius: 16px;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 40px 36px;
  background: #fff;
  box-shadow: var(--df-shadow);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.zifn-wrap::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--df-accent), var(--df-accent2));
  border-radius: 20px 20px 0 0;
}
.zifn-wrap *, .zifn-wrap *::before, .zifn-wrap *::after { box-sizing: border-box; }

/* Honeypot — off-screen, not display:none (some bots skip hidden inputs). */
.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 ── */
.zifn-progress { display: flex; align-items: center; justify-content: center; margin-bottom: 32px; }
.zifn-ps { display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: .35; transition: opacity .3s; }
.zifn-ps.active, .zifn-ps.done { opacity: 1; }
.zifn-pn {
  width: 36px; height: 36px; border-radius: 50%;
  background: #f3f4f6; border: 2px solid var(--df-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--df-muted);
  transition: all .3s;
}
.zifn-ps.active .zifn-pn { background: var(--df-accent); border-color: var(--df-accent); color: #fff; box-shadow: 0 0 0 4px rgba(var(--df-accent-rgb),.15); }
.zifn-ps.done .zifn-pn   { background: var(--df-success); border-color: var(--df-success); color: #fff; }
.zifn-pl { font-size: 11px; color: var(--df-muted); white-space: nowrap; letter-spacing: .03em; }
.zifn-ps.active .zifn-pl { color: var(--df-accent); font-weight: 700; }
.zifn-ps.done .zifn-pl   { color: var(--df-success); }
.zifn-pline { flex: 1; height: 2px; background: var(--df-border); margin: 0 8px; margin-bottom: 20px; max-width: 56px; border-radius: 2px; }

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

/* ── Form group ── */
.zifn-fg { margin-bottom: 18px; }
.zifn-fg label { display: block; font-size: 11px; font-weight: 700; color: var(--df-muted); margin-bottom: 7px; letter-spacing: .07em; text-transform: uppercase; }
.zifn-req { color: var(--df-accent); }
.zifn-fg input[type="text"],
.zifn-fg input[type="email"],
.zifn-fg input[type="tel"] {
  width: 100%; background: var(--df-bg); border: 1.5px solid var(--df-border);
  border-radius: var(--df-radius); padding: 12px 15px; color: var(--df-text);
  font-family: inherit; font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.zifn-fg input:focus { outline: none; border-color: var(--df-accent); box-shadow: 0 0 0 3px rgba(var(--df-accent-rgb),.1); background: #fff; }
.zifn-fg input::placeholder { color: #c4c9d9; }
.zifn-err { display: block; color: var(--df-error); font-size: 12px; margin-top: 5px; min-height: 15px; }

/* ── Buttons ── */
.zifn-btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.zifn-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 24px; border-radius: 50px; border: none;
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .22s; white-space: nowrap;
}
.zifn-btn-primary { background: linear-gradient(135deg,var(--df-accent),var(--df-accent-h)); color: #000000 !important; box-shadow: 0 4px 16px rgba(var(--df-accent-rgb),.35); }
.zifn-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 24px rgba(var(--df-accent-rgb),.45); }
.zifn-btn-secondary { background: #f3f4f6; color: var(--df-text) !important; }
.zifn-btn-secondary:hover { background: #e9ebf0; }

/* ── Amount box ── */
.zifn-amount-box {
  background: linear-gradient(135deg,#fff5ee,#ffede0);
  border: 1.5px solid rgba(var(--df-accent-rgb),.25);
  border-radius: var(--df-radius); padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.zifn-amount-label { font-size: 13px; color: var(--df-muted); font-weight: 600; margin-bottom: 4px; }
.zifn-amount-badge { display: inline-block; background: linear-gradient(135deg,var(--df-accent),var(--df-accent-h)); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; letter-spacing: .05em; text-transform: uppercase; margin-top: 4px; }
.zifn-amount-val { font-size: 30px; font-weight: 800; color: var(--df-accent); }

/* ── Payment method cards ── */
.zifn-pay-label { font-size: 12px; font-weight: 700; color: var(--df-muted); text-transform: uppercase; letter-spacing: .6px; margin: 0 0 10px; }
.zifn-pay-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.zifn-pay-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 17px; border: 2px solid var(--df-border); border-radius: 11px;
  background: var(--df-bg); text-decoration: none; color: var(--df-text);
  transition: border-color .18s, box-shadow .18s, background .18s, transform .12s;
  cursor: pointer;
}
.zifn-pay-card:hover { border-color: var(--df-accent); background: #fff; box-shadow: 0 4px 16px rgba(var(--df-accent-rgb),.1); transform: translateY(-1px); text-decoration: none; color: var(--df-text); }
/* Selected state — set by JS when user clicks a payment card */
.zifn-pay-card.zifn-pay-selected { border-color: var(--df-accent) !important; background: #fff !important; box-shadow: 0 0 0 3px rgba(var(--df-accent-rgb),.18) !important; }
.zifn-pay-card.zifn-pay-selected .zifn-pay-arrow { transform: translateX(3px); }
.zifn-pay-left { display: flex; flex-direction: column; gap: 7px; }
.zifn-pay-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.zifn-pay-icon { width: 19px; height: 19px; color: var(--df-accent); flex-shrink: 0; }
.zifn-pay-logos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zifn-pay-arrow { font-size: 17px; color: var(--df-accent); font-weight: 700; flex-shrink: 0; transition: transform .18s; }
.zifn-pay-card:hover .zifn-pay-arrow { transform: translateX(3px); }

/* PayPal card */
.zifn-pay-paypal { border-color: #c0d9f0; background: #f0f7ff; }
.zifn-pay-paypal:hover { border-color: #003087; box-shadow: 0 4px 16px rgba(0,48,135,.12); }
.zifn-pay-paypal .zifn-pay-title { color: #003087; }
.zifn-pay-paypal .zifn-pay-icon  { color: #009cde; }
.zifn-pay-paypal .zifn-pay-arrow { color: #009cde; }

/* Crypto card */
.zifn-pay-crypto { border-color: #e9d5ff; background: #faf5ff; }
.zifn-pay-crypto:hover { border-color: #7c3aed; box-shadow: 0 4px 16px rgba(124,58,237,.12); }

/* Crypto badges */
.zifn-crypto-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.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(--df-muted); text-align: center; margin: 6px 0 18px; line-height: 1.5; }

/* ── File upload ── */
.zifn-file-drop {
  position: relative; border: 2px dashed var(--df-border); border-radius: var(--df-radius);
  padding: 26px; text-align: center; cursor: pointer; transition: all .2s; background: var(--df-bg);
}
.zifn-file-drop:hover, .zifn-file-drop.dragover { border-color: var(--df-accent); background: #fff5ee; }
.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; }
.zifn-file-name { font-size: 13px; color: var(--df-muted); }
.zifn-file-hint { display: block; font-size: 11px; color: #9ca3af; margin-top: 7px; text-align: center; }

/* Image preview */
.zifn-preview-wrap { margin-top: 10px; border: 1.5px solid var(--df-success); border-radius: var(--df-radius); overflow: hidden; background: #f0fdf4; }
.zifn-preview-img  { width: 100%; max-height: 200px; object-fit: contain; display: block; padding: 8px; }
.zifn-preview-remove { display: block; width: 100%; background: #fee2e2; border: none; border-top: 1px solid #fca5a5; color: #b91c1c; font-size: 13px; font-weight: 600; padding: 8px; cursor: pointer; transition: background .2s; font-family: inherit; }
.zifn-preview-remove:hover { background: #fecaca; }

/* ── Summary ── */
.zifn-summary { background: var(--df-bg); border: 1px solid var(--df-border); border-radius: var(--df-radius); padding: 18px; margin-bottom: 6px; }
.zifn-summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--df-border); font-size: 13px; }
.zifn-summary-row:last-child { border-bottom: none; }
.zifn-summary-row span:first-child { color: var(--df-muted); }
.zifn-summary-row span:last-child  { font-weight: 600; color: var(--df-text); }

/* ── Spinner / Success ── */
.zifn-spinner { width: 52px; height: 52px; border: 3px solid var(--df-border); border-top-color: var(--df-accent); border-radius: 50%; animation: zifn-spin 1s linear infinite; margin: 0 auto 20px; }
@keyframes zifn-spin { to { transform: rotate(360deg); } }
.zifn-success-icon { width: 70px; height: 70px; background: linear-gradient(135deg,var(--df-success),#047857); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; margin: 0 auto 20px; animation: zifn-pop .5s cubic-bezier(.175,.885,.32,1.275); box-shadow: 0 0 0 8px rgba(5,150,105,.12); }
@keyframes zifn-pop { 0%{transform:scale(0);opacity:0} 100%{transform:scale(1);opacity:1} }
.zifn-waiting, .zifn-success { text-align: center; padding: 16px 0; }

/* ── WhatsApp button ── */
.zifn-wa-wrap { margin-top: 32px; padding-top: 24px; border-top: 1.5px dashed #e4e7f0; position: relative; }
.zifn-wa-wrap::before { content: '— Hilfe benötigt? —'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 10px; font-size: 10px; font-weight: 600; color: #b0b8c8; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.zifn-wa-btn { display: flex; align-items: center; width: 100%; text-decoration: none; border-radius: 12px; background: #f0fdf4; border: 1.5px solid #bbf7d0; box-shadow: 0 2px 12px rgba(37,211,102,.1); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
.zifn-wa-btn:hover { transform: translateY(-2px); border-color: #4ade80; box-shadow: 0 6px 24px rgba(37,211,102,.18); text-decoration: none; }
.zifn-wa-icon-col { flex-shrink: 0; width: 60px; align-self: stretch; 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,.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,.3)} 50%{box-shadow:0 2px 18px rgba(37,211,102,.5)} }
.zifn-wa-text { flex: 1; padding: 12px 13px; }
.zifn-wa-label { font-size: 13px; font-weight: 700; color: #14532d; }
.zifn-wa-desc  { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 11px; color: #6b7280; }
.zifn-wa-dot   { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; flex-shrink: 0; animation: zifn-dot-blink 2s ease-in-out infinite; }
@keyframes zifn-dot-blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.zifn-wa-cta   { flex-shrink: 0; padding: 0 14px 0 6px; display: inline-block; background: #16a34a; color: #fff; font-size: 12px; font-weight: 700; padding: 7px 13px; border-radius: 7px; margin-right: 8px; white-space: nowrap; }

/* ── Extra fields (MAC / Key) ── */
.ziflyn-mac-wrap {
  display: flex;
  gap: 8px;
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .zifn-wrap { padding: 24px 16px; border-radius: 10px; }
  .zifn-amount-val { font-size: 24px; }
  .zifn-step-title { font-size: 16px; }
}
