/* willmixen2026-child — Cookflow (gefuehrter Vollbild-Kochmodus)  @since 0.9.119
   Nutzt die :root-Tokens aus recipe-template.css (--bg, --surface, --ink*,
   --accent, --accent-fg, --accent-soft, --font-serif, --font-sans, --r-*).
   Fallbacks gesetzt, falls das Overlay vor recipe-template.css greift. */

html.wmc-cf-lock { overflow: hidden; }

.wmc-cf-launch {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: auto;
  padding: 8px 14px;
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 14px; font-weight: 700; line-height: 1;
  color: var(--accent-fg, #fff);
  background: var(--accent, #c2613f);
  border: 0; border-radius: var(--r-pill, 999px);
  cursor: pointer;
}
.wmc-cf-launch:hover { filter: brightness(1.05); }
.wmc-cf-launch svg { flex: none; }

/* ---------- Overlay ---------- */
.wmc-cookflow {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  background: var(--bg, #fbf7f1);
  color: var(--ink, #25201b);
  font-family: var(--font-sans, system-ui, sans-serif);
}
.wmc-cookflow[hidden] { display: none; }

/* ---------- Top-Bar ---------- */
.wmc-cf__top {
  flex: none;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--line, rgba(0,0,0,.08));
  background: var(--surface, #fff);
}
.wmc-cf__close, .wmc-cf__photo {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line, rgba(0,0,0,.12)); background: transparent;
  color: inherit; cursor: pointer; border-radius: var(--r-md, 10px);
}
.wmc-cf__close { width: 40px; height: 40px; }
/* Icon-Maße explizit: eine globale Theme-Regel nullt sonst die SVG-Breite im
   Flex-Button -> leerer Close-Button oben links (Fix v0.9.128). */
.wmc-cf__close svg { width: 22px; height: 22px; flex: none; }
.wmc-cf-launch svg { width: 16px; height: 16px; flex: none; }
.wmc-cf__photo { padding: 8px 12px; font-size: 13px; font-weight: 700; }
.wmc-cf__photo[aria-pressed="false"] { opacity: .5; }
.wmc-cf__counter {
  text-align: center; font-family: var(--font-serif, Georgia, serif);
  font-size: 18px; font-weight: 700;
}
.wmc-cf__dots {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; justify-content: center;
  padding-top: 4px;
}
.wmc-cf__dot {
  width: 11px; height: 11px; padding: 0; border-radius: 50%;
  border: 2px solid var(--accent, #c2613f); background: transparent; cursor: pointer;
}
.wmc-cf__dot.current { box-shadow: 0 0 0 3px var(--accent-soft, rgba(194,97,63,.25)); }
.wmc-cf__dot.done { background: var(--accent, #c2613f); }

/* ---------- Slides ---------- */
.wmc-cf__viewport { flex: 1; overflow: hidden; position: relative; }
.wmc-cf__track {
  display: flex; height: 100%;
  transition: transform .28s ease;
}
@media (prefers-reduced-motion: reduce) { .wmc-cf__track { transition: none; } }
.wmc-cf__slide {
  flex: 0 0 100%; min-width: 100%;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 22px clamp(16px, 5vw, 64px) 40px;
  display: flex; flex-direction: column; gap: 16px;
  max-width: 820px; margin: 0 auto;
}
.wmc-cf__fig { margin: 0; border-radius: var(--r-lg, 16px); overflow: hidden; }
.wmc-cf__fig img { display: block; width: 100%; height: auto; max-height: 38vh; object-fit: cover; }
.wmc-cf--nophoto .wmc-cf__fig { display: none; }
.wmc-cf__num {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif, Georgia, serif); font-size: 22px; font-weight: 700;
  color: var(--accent-fg, #fff); background: var(--accent, #c2613f);
}
.wmc-cf__slide.is-done .wmc-cf__num { background: var(--ok, #3c9a5f); }
.wmc-cf__text {
  font-size: clamp(20px, 3.4vw, 28px); line-height: 1.5;
  font-family: var(--font-serif, Georgia, serif);
}
.wmc-cf__text p { margin: 0 0 .6em; }
.wmc-cf__text strong { color: var(--accent-ink, var(--accent, #b4502f)); }

/* ---------- Pills (used ingredients) ---------- */
.wmc-cf__pills { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wmc-cf__pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--r-pill, 999px);
  background: var(--surface-2, #f1e9df); font-size: 15px; cursor: pointer;
  border: 1px solid transparent;
}
.wmc-cf__pill::before {
  content: ""; width: 16px; height: 16px; border-radius: 4px;
  border: 2px solid var(--accent, #c2613f); flex: none;
}
.wmc-cf__pill.checked { opacity: .55; text-decoration: line-through; }
.wmc-cf__pill.checked::before { background: var(--accent, #c2613f); }
.wmc-cf__pill--static { cursor: default; }
.wmc-cf__pill--static::before { display: none; }

/* ---------- Timer-Chips ---------- */
.wmc-cf__timers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.wmc-cf__timer {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--r-md, 12px);
  font-size: 19px; font-weight: 700; cursor: pointer;
  color: var(--ink, #25201b);
  background: var(--highlight, #fdf0d5); border: 2px solid var(--accent, #c2613f);
}
.wmc-cf__timer small { display: block; font-size: 12px; font-weight: 500; opacity: .7; }
.wmc-cf__timer.running { background: var(--accent, #c2613f); color: var(--accent-fg, #fff); }
.wmc-cf__timer-ic { font-size: 20px; }

/* ---------- Bottom-Nav ---------- */
.wmc-cf__bottom {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line, rgba(0,0,0,.08)); background: var(--surface, #fff);
}
.wmc-cf__nav, .wmc-cf__drawer-btn {
  padding: 14px 18px; border-radius: var(--r-md, 12px); font-size: 16px; font-weight: 700;
  border: 1px solid var(--line, rgba(0,0,0,.15)); background: transparent; color: inherit; cursor: pointer;
}
.wmc-cf__nav--primary { background: var(--accent, #c2613f); color: var(--accent-fg, #fff); border-color: transparent; }
.wmc-cf__nav:disabled { opacity: .35; cursor: default; }
.wmc-cf__drawer-btn { white-space: nowrap; }

/* ---------- Drawer (Zutaten) ---------- */
.wmc-cf__drawer {
  position: absolute; inset: 0 0 0 auto; width: min(420px, 90vw);
  background: var(--surface, #fff); box-shadow: -8px 0 30px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease; z-index: 5;
}
.wmc-cf__drawer.open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .wmc-cf__drawer { transition: none; } }
.wmc-cf__drawer[hidden] { display: none; }
.wmc-cf__drawer-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--line, rgba(0,0,0,.08));
  font-family: var(--font-serif, Georgia, serif); font-size: 18px;
}
.wmc-cf__drawer-close { border: 0; background: var(--accent, #c2613f); color: var(--accent-fg, #fff);
  padding: 8px 14px; border-radius: var(--r-pill, 999px); font-weight: 700; cursor: pointer; }
.wmc-cf__drawer-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.wmc-cf__ding {
  display: flex; gap: 10px; align-items: baseline; padding: 12px 10px; cursor: pointer;
  border-bottom: 1px solid var(--line, rgba(0,0,0,.06)); font-size: 16px;
}
.wmc-cf__ding-qty { font-weight: 700; min-width: 64px; color: var(--accent-ink, var(--accent, #b4502f)); }
.wmc-cf__ding.checked { opacity: .5; text-decoration: line-through; }

/* ---------- Toast ---------- */
.wmc-cf__toast {
  position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: var(--ink, #25201b); color: #fff; padding: 12px 20px; border-radius: var(--r-pill, 999px);
  font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 6;
  max-width: 90vw; text-align: center;
}
.wmc-cf__toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Desktop-Layout: 2-spaltig (Bild links, Schritt rechts) ----------
   Mobil (<900px) bleibt die vertikale Spalte. Ab 900px Bild links (gekappt,
   sticky) und Nummer/Text/Pills/Timer rechts -> nutzt die Breite statt eines
   ueber die volle Breite gestreckten Bildes mit totem Raum darunter.
   (v0.9.128, Tobias-Wunsch Desktop-Layout-Optimierung) */
@media (min-width: 900px) {
  .wmc-cf__slide { padding-top: 40px; }
  .wmc-cf__text { font-size: clamp(20px, 1.6vw, 26px); }

  .wmc-cookflow:not(.wmc-cf--nophoto) .wmc-cf__slide:has(.wmc-cf__fig) {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 560px);
    justify-content: center;
    align-content: start;
    column-gap: 48px;
    row-gap: 14px;
  }
  .wmc-cookflow:not(.wmc-cf--nophoto) .wmc-cf__slide:has(.wmc-cf__fig) .wmc-cf__fig {
    grid-column: 1;
    grid-row: 1 / span 6;
    align-self: start;
    position: sticky;
    top: 4px;
    margin: 0;
  }
  .wmc-cookflow:not(.wmc-cf--nophoto) .wmc-cf__slide:has(.wmc-cf__fig) .wmc-cf__fig img {
    max-height: 76vh;
  }
  .wmc-cookflow:not(.wmc-cf--nophoto) .wmc-cf__slide:has(.wmc-cf__fig) > :not(.wmc-cf__fig) {
    grid-column: 2;
  }

  /* Slides ohne Foto (oder Foto-Toggle aus): zentrierte, gekappte Spalte */
  .wmc-cf__slide:not(:has(.wmc-cf__fig)) { align-items: center; }
  .wmc-cf__slide:not(:has(.wmc-cf__fig)) > * { width: 100%; max-width: 680px; }
}
