/* Wunderfunken – Basis für Modals, Warenkorb, Toast & Design-Umschalter.
   Jedes Design setzt diese Variablen auf :root, um die Komponenten einzufärben. */
:root {
  --wf-bg: #fffaf2;
  --wf-surface: #ffffff;
  --wf-ink: #3b2a20;
  --wf-muted: #7a6a5e;
  --wf-line: #eadfd2;
  --wf-accent: #c8794a;
  --wf-accent-ink: #ffffff;
  --wf-soft: #fbeee0;
  --wf-radius: 18px;
  --wf-font: system-ui, sans-serif;
  --wf-font-head: var(--wf-font);
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; }
body.wf-locked { overflow: hidden; }
.brand { flex: none; white-space: nowrap; }
:focus-visible { outline: 3px solid var(--wf-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.wf-ui { font-family: var(--wf-font); color: var(--wf-ink); }
.wf-overlay { position: fixed; inset: 0; background: rgba(40, 28, 20, .45); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 900; }
.wf-ui.wf-open .wf-overlay { opacity: 1; pointer-events: auto; }

.wf-modal { position: fixed; z-index: 910; left: 50%; top: 50%; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--wf-surface); border-radius: var(--wf-radius); padding: 28px 24px 22px; box-shadow: 0 30px 80px rgba(40, 28, 20, .3);
  transform: translate(-50%, -46%) scale(.97); opacity: 0; pointer-events: none; transition: .25s ease; }
.wf-modal.wf-show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
@media (max-width: 600px) {
  .wf-modal { top: auto; bottom: 0; left: 0; width: 100%; max-height: 92dvh; border-radius: var(--wf-radius) var(--wf-radius) 0 0; transform: translateY(30px); }
  .wf-modal.wf-show { transform: none; }
}
.wf-modal-head h3, .wf-drawer-head h3 { font-family: var(--wf-font-head); margin: 4px 0 6px; font-size: 1.35rem; line-height: 1.2; padding-right: 32px; }
.wf-eyebrow { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--wf-accent); font-weight: 700; }
.wf-muted { color: var(--wf-muted); }
.wf-small { font-size: .82rem; margin: 12px 0 0; }
.wf-x { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--wf-soft); color: var(--wf-ink); font-size: 22px; line-height: 1; cursor: pointer; }
.wf-drawer-head .wf-x { position: static; }

.wf-choice { display: grid; gap: 10px; margin: 18px 0 12px; }
.wf-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--wf-line); border-radius: calc(var(--wf-radius) * .7); cursor: pointer; transition: .15s; }
.wf-opt:has(input:checked) { border-color: var(--wf-accent); background: var(--wf-soft); }
.wf-opt input { accent-color: var(--wf-accent); margin-top: 3px; width: 18px; height: 18px; flex: none; }
.wf-opt b { display: block; }
.wf-opt small { color: var(--wf-muted); }

.wf-gifts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
@media (max-width: 480px) { .wf-gifts { grid-template-columns: 1fr; } }
.wf-gift { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1.5px solid var(--wf-line); border-radius: calc(var(--wf-radius) * .6); transition: .15s; }
.wf-gift.wf-on { border-color: var(--wf-accent); background: var(--wf-soft); }
.wf-gift-emoji { font-size: 1.6rem; width: 36px; text-align: center; flex: none; }
.wf-gift-info { flex: 1; min-width: 0; line-height: 1.2; }
.wf-gift-info b { display: block; font-size: .92rem; }
.wf-gift-info small { color: var(--wf-muted); font-size: .76rem; }
.wf-stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.wf-stepper button { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--wf-accent); background: var(--wf-surface); color: var(--wf-accent); font-size: 18px; line-height: 1; cursor: pointer; }
.wf-stepper button:disabled { opacity: .3; cursor: default; }
.wf-stepper output { min-width: 16px; text-align: center; font-weight: 700; }

.wf-sticky { position: sticky; bottom: -22px; margin: 0 -24px -22px; padding: 12px 24px 22px; background: var(--wf-surface); border-top: 1.5px solid var(--wf-line); }
.wf-budget { margin: 0 0 12px; }
.wf-meter { height: 8px; border-radius: 9px; background: var(--wf-line); overflow: hidden; margin-bottom: 10px; }
.wf-meter i { display: block; height: 100%; background: var(--wf-accent); transition: width .3s; }
.wf-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.wf-row.wf-accent { color: var(--wf-accent); }
.wf-row.wf-total { font-size: 1.15rem; border-top: 1.5px solid var(--wf-line); margin-top: 6px; padding-top: 10px; }

.wf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.wf-btn:hover { transform: translateY(-1px); }
.wf-btn-primary { background: var(--wf-accent); color: var(--wf-accent-ink); box-shadow: 0 8px 20px -8px var(--wf-accent); }
.wf-btn-ghost { background: transparent; border-color: var(--wf-line); color: var(--wf-ink); }
.wf-block { width: 100%; }
.wf-link { background: none; border: 0; color: var(--wf-muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .8rem; padding: 2px 0; }

.wf-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 12px; }
@media (max-width: 420px) { .wf-amounts { grid-template-columns: repeat(2, 1fr); } }
.wf-amt { padding: 14px 6px; border: 2px solid var(--wf-line); border-radius: calc(var(--wf-radius) * .6); background: var(--wf-surface); color: var(--wf-ink); font: inherit; font-weight: 700; cursor: pointer; }
.wf-amt.wf-on { border-color: var(--wf-accent); background: var(--wf-soft); color: var(--wf-accent); }
.wf-field { display: grid; gap: 6px; margin-bottom: 16px; font-size: .9rem; }
.wf-field input { padding: 12px 14px; border: 2px solid var(--wf-line); border-radius: calc(var(--wf-radius) * .6); font: inherit; background: var(--wf-surface); color: var(--wf-ink); }

.wf-drawer { position: fixed; z-index: 910; top: 0; right: 0; height: 100dvh; width: min(420px, 100vw); background: var(--wf-surface); display: flex; flex-direction: column;
  transform: translateX(105%); visibility: hidden; transition: transform .3s ease, visibility 0s .3s; box-shadow: -20px 0 60px rgba(40, 28, 20, .2); }
.wf-drawer.wf-show { transform: none; visibility: visible; transition: transform .3s ease; }
.wf-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1.5px solid var(--wf-line); }
.wf-drawer-body { flex: 1; overflow: auto; padding: 8px 20px; }
.wf-drawer-foot { padding: 16px 20px 20px; border-top: 1.5px solid var(--wf-line); background: var(--wf-soft); }
.wf-line { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--wf-line); }
.wf-line small { display: block; color: var(--wf-muted); font-size: .82rem; margin-top: 2px; }
.wf-line-r { text-align: right; flex: none; }
.wf-line-r b, .wf-line-r .wf-link { display: block; margin-left: auto; }
.wf-empty { text-align: center; padding: 48px 10px; color: var(--wf-muted); }
.wf-empty div { font-size: 3rem; }
.wf-fulfil { display: grid; gap: 8px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1.5px solid var(--wf-line); }
.wf-fulfil .wf-opt { padding: 10px 12px; background: var(--wf-surface); }
.wf-fulfil select { width: 100%; padding: 10px; border: 1.5px solid var(--wf-line); border-radius: 10px; font: inherit; font-size: .85rem; background: var(--wf-surface); color: var(--wf-ink); }
.wf-pay { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; font-size: .78rem; color: var(--wf-muted); }
.wf-pay i { font-style: normal; padding: 3px 8px; border: 1px solid var(--wf-line); border-radius: 6px; background: var(--wf-surface); color: var(--wf-ink); font-weight: 600; }

.wf-toast { position: fixed; z-index: 950; left: 50%; bottom: 76px; transform: translate(-50%, 20px); background: var(--wf-ink); color: var(--wf-surface); padding: 12px 18px; border-radius: 999px;
  font-weight: 600; font-size: .92rem; opacity: 0; pointer-events: none; transition: .3s; max-width: calc(100vw - 32px); text-align: center; }
.wf-toast.wf-show { opacity: 1; transform: translate(-50%, 0); }

[data-cart-count] { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: .72rem; font-weight: 800; background: var(--wf-accent); color: var(--wf-accent-ink); }
[data-cart-count]:not(.wf-has) { opacity: .5; }

/* Mobiler Sofort-Spenden-Button */
.wf-fab { display: none; }
@media (max-width: 600px) {
  .wf-fab { display: block; position: fixed; z-index: 800; right: 12px; bottom: 12px; border: 0; border-radius: 999px; padding: 12px 18px; font: 700 15px/1 var(--wf-font);
    background: var(--wf-accent); color: var(--wf-accent-ink); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); cursor: pointer; }
}

/* Umschalter zwischen den Vorschlägen (nur für die Designphase) */
.wf-switcher { position: fixed; z-index: 800; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 2px; background: rgba(30, 24, 20, .86); color: #fff; border-radius: 999px; padding: 4px;
  font: 600 12px/1 system-ui, sans-serif; backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.wf-switcher a { color: #fff; text-decoration: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 16px; }
.wf-switcher a:hover { background: rgba(255, 255, 255, .15); }
.wf-switcher span { padding: 0 8px; white-space: nowrap; }
@media (max-width: 480px) { .wf-switcher span { display: none; } }
