/* Recipe view and archive – per docs/ui/round-2-alignment.html sections 2 and 3. Fonts come from the theme. */
.rezepte-view,
.rezepte-archive {
	--rezepte-accent: #2f6b3a;
	--rezepte-muted: #5b564e;
	--rezepte-line: #ddd5c8;
	--rezepte-edge: #8a8378;
	--rezepte-surface: #fff;
	--rezepte-have: #f4f1eb;
	--rezepte-text: #1f1d1a;
}

.rezepte-view { container-type: inline-size; }
.rezepte-view h2 { margin: 0; font-size: 1.5rem; }
.rezepte-back { margin: 0 0 0.5rem; font-size: 1.25rem; }
.rezepte-back a { color: var(--rezepte-accent); }
.rezepte-meta { color: var(--rezepte-muted); font-size: 1.25rem; margin: 0 0 1rem; }
.rezepte-grid { display: grid; gap: 1.5rem; align-items: start; }
.rezepte-grid.is-single { max-width: var(--wp--style--global--content-size, 640px); margin: 0 auto; }
.rezepte-source { color: var(--rezepte-muted); font-size: 1.125rem; margin: 0 0 1rem; }
.rezepte-source a { color: inherit; }
.rezepte-view:has(.rezepte-grid.is-single) .rezepte-back,
.rezepte-view:has(.rezepte-grid.is-single) .rezepte-source,
.rezepte-view:has(.rezepte-grid.is-single) .rezepte-meta { max-width: var(--wp--style--global--content-size, 640px); margin-left: auto; margin-right: auto; }
.rezepte-shop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 0.5rem; }
.rezepte-shop-head small { font-size: 1rem; color: var(--rezepte-muted); }

.rezepte-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 12px; padding: 4px; background: var(--rezepte-have); border: 1px solid var(--rezepte-line); border-radius: 12px; }
.rezepte-mode[hidden] { display: none; }
.rezepte-mode button { min-height: 48px; border: 0; border-radius: 9px; background: transparent; color: var(--rezepte-text); font: inherit; font-size: 1.0625rem; font-weight: 600; cursor: pointer; }
.rezepte-mode button[aria-pressed="true"] { background: var(--rezepte-accent); color: #fff; }
.rezepte-mode button:focus-visible { outline: 3px solid var(--rezepte-text); outline-offset: 2px; }
.rezepte-list { list-style: none; margin: 0; padding: 0; background: var(--rezepte-surface); color: var(--rezepte-text); border: 1px solid var(--rezepte-line); border-radius: 14px; overflow: hidden; }
.rezepte-list li { margin: 0; }
.rezepte-list li + li { border-top: 1px solid var(--rezepte-line); }
.rezepte-list label { display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 6px 16px; font-size: 1.25rem; line-height: 1.3; cursor: pointer; }
.rezepte-list input { appearance: none; -webkit-appearance: none; width: 30px; height: 30px; border: 2px solid var(--rezepte-muted); border-radius: 8px; flex: none; margin: 0; display: grid; place-content: center; background: #fff; cursor: pointer; }
.rezepte-list input:checked { background: var(--rezepte-accent); border-color: var(--rezepte-accent); }
.rezepte-list input:checked::after { content: "✓"; color: #fff; font-size: 20px; font-weight: 700; line-height: 1; }
.rezepte-list input:focus-visible { outline: 3px solid var(--rezepte-text); outline-offset: 2px; }
.rezepte-q { font-weight: 700; margin-right: 6px; white-space: nowrap; }
.rezepte-list li.is-have { background: var(--rezepte-have); }
.rezepte-list li.is-have .rezepte-txt { color: var(--rezepte-muted); text-decoration: line-through; }
.rezepte-tag { margin-left: auto; font-size: 0.875rem; color: var(--rezepte-muted); white-space: nowrap; }

.rezepte-dock { position: sticky; bottom: 0; z-index: 5; display: grid; gap: 8px; margin: 12px -16px 0; padding: 12px 16px 16px; background: var(--rezepte-surface); border-top: 1px solid var(--rezepte-line); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08); }
.rezepte-dock[hidden] { display: none; }
.rezepte-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 18px; border-radius: 12px; border: 2px solid var(--rezepte-accent); background: #fff; color: var(--rezepte-accent); font: inherit; font-size: 1.125rem; font-weight: 700; cursor: pointer; text-decoration: none; }
.rezepte-btn-solid { background: var(--rezepte-accent); color: #fff; }
.rezepte-btn-plain { min-height: 48px; font-size: 1rem; border-color: transparent; }
.rezepte-btn:focus-visible { outline: 3px solid var(--rezepte-text); outline-offset: 2px; }
.rezepte-btn[disabled] { background: var(--rezepte-have); border-color: var(--rezepte-line); color: var(--rezepte-muted); cursor: default; }
.rezepte-btn[aria-disabled="true"] { background: var(--rezepte-have); border-color: var(--rezepte-line); color: var(--rezepte-muted); cursor: default; pointer-events: none; }
.rezepte-btn[hidden] { display: none; }
.rezepte-toast:empty { display: none; }
.rezepte-toast { position: sticky; top: 8px; z-index: 6; margin: 0 0 12px; background: var(--rezepte-text); color: #fff; padding: 14px 16px; border-radius: 12px; font-size: 1.125rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); }
.rezepte-toast.is-success { background: #1e7a3c; }
.rezepte-toast.is-error { background: #b3261e; }
.rezepte-fallback { width: 100%; min-height: 8em; font: inherit; font-size: 1rem; }

.rezepte-steps { margin: 0.5rem 0 0; padding: 0; list-style: none; counter-reset: rezepte-step; }
.rezepte-steps li { counter-increment: rezepte-step; display: grid; grid-template-columns: 44px 1fr; gap: 12px; margin: 0; padding: 12px 0; font-size: 1.1875rem; line-height: 1.6; border-bottom: 1px solid var(--rezepte-line); }
.rezepte-steps li::before { content: counter(rezepte-step); width: 36px; height: 36px; border-radius: 50%; background: var(--rezepte-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.0625rem; line-height: 1; }

@container (min-width: 860px) {
	.rezepte-grid:not(.is-single) { grid-template-columns: minmax(320px, 400px) 1fr; gap: 48px; }
	.rezepte-ingredients { position: sticky; top: 16px; }
	.rezepte-dock { position: static; margin: 12px 0 0; padding: 0; background: none; border: 0; box-shadow: none; }
}

/* Archive */
.rezepte-archive-main { padding: 0 var(--wp--style--root--padding-right, 16px) 0 var(--wp--style--root--padding-left, 16px); }
.rezepte-archive { max-width: 1080px; margin: 0 auto; padding: 32px 0 48px; }
.rezepte-archive-title { margin: 0 0 16px; }
.rezepte-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rezepte-cards li { margin: 0; }
.rezepte-card { display: block; min-height: 64px; padding: 14px 16px; background: var(--rezepte-surface); color: var(--rezepte-text); border: 1px solid var(--rezepte-line); border-radius: 14px; text-decoration: none; }
.rezepte-card:hover,
.rezepte-card:focus-visible { border-color: var(--rezepte-accent); }
.rezepte-card strong { display: block; font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.rezepte-card span { color: var(--rezepte-muted); font-size: 0.9375rem; }
.rezepte-empty { font-size: 1.1875rem; }
.rezepte-archive-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.rezepte-archive-head .rezepte-archive-title { margin: 0; }
.rezepte-archive .rezepte-btn.rezepte-btn-compact { width: auto; min-height: 44px; padding: 0 14px; font-size: 1rem; }
.rezepte-ico { display: inline-block; margin-right: 8px; }
.rezepte-archive .rezepte-btn { width: 100%; max-width: 360px; box-sizing: border-box; }

@media (min-width: 720px) {
	.rezepte-cards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (min-width: 1024px) {
	.rezepte-cards { grid-template-columns: repeat(3, 1fr); }
}

.rezepte-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.rezepte-card-tags { margin: 6px 4px 0; }
.rezepte-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font: inherit; font-size: 0.9375rem; color: var(--rezepte-text); background: var(--rezepte-surface); border: 1px solid var(--rezepte-edge); border-radius: 999px; text-decoration: none; cursor: pointer; }
@media (hover: hover) {
	.rezepte-chip:hover { border-color: var(--rezepte-accent); }
}
.rezepte-chip:focus-visible,
.rezepte-card:focus-visible,
.rezepte-icon-btn:focus-visible { outline: 3px solid var(--rezepte-text); outline-offset: 2px; }
.rezepte-chip.is-on { background: var(--rezepte-accent); border-color: var(--rezepte-accent); color: #fff; }
.rezepte-chip-clear { color: var(--rezepte-muted); }
.rezepte-toolbar { position: relative; margin: 0 0 12px; }
.rezepte-toolbar .rezepte-chips { margin: 0 0 8px; }
.rezepte-toolbar-row { align-items: center; }
.rezepte-menu { position: static; }
.rezepte-menu summary { list-style: none; }
.rezepte-menu summary::-webkit-details-marker { display: none; }
.rezepte-menu summary::after { content: '▾'; margin-left: 6px; font-size: 0.75rem; }
.rezepte-menu[open] summary::after { content: '▴'; }
.rezepte-menu-body { position: absolute; z-index: 8; left: 0; margin-top: 4px; min-width: 220px; padding: 6px; background: var(--rezepte-surface); border: 1px solid var(--rezepte-edge); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); }
nav.rezepte-menu-body a { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 4px 12px; color: var(--rezepte-text); text-decoration: none; border-radius: 8px; }
nav.rezepte-menu-body a[aria-current="true"] { font-weight: 700; background: var(--rezepte-have); }
nav.rezepte-menu-body a small { font-size: 0.8125rem; color: var(--rezepte-muted); font-weight: 400; }
nav.rezepte-menu-body a:focus-visible { outline: 3px solid var(--rezepte-text); outline-offset: -3px; }
.rezepte-chips .rezepte-menu-body.rezepte-chips { margin: 4px 0 0; }
.rezepte-menu-wide .rezepte-menu-body { left: 0; right: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.rezepte-menu-end .rezepte-menu-body { left: auto; right: 0; }
.rezepte-chip.is-set::before { content: '●'; margin-right: 6px; font-size: 0.5rem; color: var(--rezepte-accent); }
.rezepte-menu[open] > summary.rezepte-chip { border-color: var(--rezepte-accent); }

.rezepte-card .rezepte-card-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.rezepte-card .rezepte-mini-tag { font-style: normal; font-size: 0.8125rem; line-height: 1; padding: 4px 8px; border-radius: 999px; background: var(--rezepte-line); color: var(--rezepte-text); }
.rezepte-group-title { margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--rezepte-line); font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: var(--rezepte-accent); }
.rezepte-group-count { font-size: 1rem; font-weight: 400; color: var(--rezepte-muted); }
.rezepte-order-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.rezepte-order-btns { display: flex; gap: 6px; }
.rezepte-inline-form { margin: 0; display: inline-block; }

.rezepte-pick { display: block; position: relative; padding-left: 52px; cursor: pointer; }
.rezepte-pick input { position: absolute; left: 14px; top: 16px; width: 24px; height: 24px; }
.rezepte-bulk-bar { position: sticky; bottom: 0; margin: 16px -4px 0; padding: 12px 4px calc(12px + env(safe-area-inset-bottom)); max-height: 45vh; overflow-y: auto; background: var(--rezepte-surface); border-top: 1px solid var(--rezepte-line); box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.12); }
.rezepte-bulk-hint { margin: 4px 0 8px; }
.rezepte-status { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--rezepte-surface); border: 2px solid var(--rezepte-edge); font-weight: 600; }
.rezepte-bulk-row { display: flex; gap: 8px; }
.rezepte-archive .rezepte-bulk-row .rezepte-btn { flex: none; width: auto; }
.rezepte-bulk-row .rezepte-inp { flex: 1; min-width: 0; box-sizing: border-box; min-height: 48px; padding: 8px 12px; font: inherit; border: 2px solid var(--rezepte-edge); border-radius: 12px; }
@media (max-width: 480px) {
	.rezepte-bulk-row { flex-wrap: wrap; }
	.rezepte-bulk-row .rezepte-inp { flex: 1 1 100%; }
	.rezepte-archive .rezepte-bulk-row .rezepte-btn { flex: 1 1 100%; }
}
