/* ==========================================================================
   EV Rezeptfinder
   Suchbereich: Gestaltung des bisherigen Rezeptfinders (v5).
   Ergebniskarten: wie die Rezeptkarten von WP Ultimate Post Grid
   (Vorlage „ev-simple") auf der restlichen Website.
   Abweichungen nur für Barrierefreiheit: dunklerer Grünton für kleine
   Schrift und aktive Elemente (Kontrast ≥ 4,5:1), sichtbarer Fokus.
   rem-Werte wie im Original (Astra: 1rem = 18px).
   ========================================================================== */

.evf {
	--evf-gruen: #708878;
	--evf-gruen-text: #56695c;   /* statt #708878 für kleine Schrift: 5,6:1 auf Weiß */
	--evf-gruen-light: #c4d1cb;
	--evf-gruen-bg: #edf1f0;
	--evf-text: #4c4c4c;
	--evf-text-light: #5f6b65;   /* statt #7a8a82: 5,4:1 auf Weiß */
	--evf-border: #dce6e2;
	--evf-shadow: 0 2px 12px rgba(112, 135, 120, 0.10);
	--evf-shadow-hover: 0 6px 24px rgba(112, 135, 120, 0.16);
	--evf-radius: 14px;
	--evf-focus: 0 0 0 2px #fff, 0 0 0 4px var(--evf-gruen-text);
	max-width: 1200px;
	margin: 0 auto;
	font-family: "Open Sans", sans-serif;
	color: var(--evf-text);
}

.evf *,
.evf *::before,
.evf *::after { box-sizing: border-box; }

/* hidden muss gegen display: flex/grid der Komponenten gewinnen */
.evf [hidden] { display: none !important; }

.evf-sr {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.evf :is(button, a, input, select, textarea, [role="option"]):focus-visible {
	outline: none;
	box-shadow: var(--evf-focus);
}

/* ── Such-Card ─────────────────────────────────────────────────────────── */

.evf-search {
	background: #fff;
	border: 1.5px solid var(--evf-border);
	border-radius: 18px;
	padding: 36px 32px 28px;
	margin-bottom: 40px;
	box-shadow: var(--evf-shadow);
}
@media (max-width: 600px) {
	.evf-search { padding: 24px 18px 20px; }
}

.evf .evf-h1 {
	margin: 0 0 12px;
	padding: 0;
	font-size: 1.6rem;
	font-weight: 300;
	line-height: 1.3;
	color: var(--evf-text);
}
.evf .evf-h1 strong { font-weight: 700; color: var(--evf-gruen); }

.evf .evf-lead {
	margin: 0 0 10px;
	font-size: 0.9rem;
	line-height: 1.7;
	color: var(--evf-text);
}
.evf .evf-hint {
	margin: 0 0 22px;
	font-size: 0.82rem;
	font-style: italic;
	line-height: 1.7;
	color: var(--evf-text-light);
}

.evf-form { margin: 0; }
.evf-combo { position: relative; }

/* Rahmen sitzt am Feld, damit ausgewählte Zutaten (Chips) mit im Suchfeld stehen */
.evf .evf-field {
	display: flex; flex-wrap: wrap; align-items: center;
	padding-right: 44px;
	background: #fff;
	border: 1.5px solid var(--evf-border);
	border-radius: var(--evf-radius);
	transition: border-color 0.2s ease;
}
.evf .evf-field:focus-within { border-color: var(--evf-gruen); }
.evf .evf-field:has(.evf-input:focus-visible) { box-shadow: var(--evf-focus); }
.evf .evf-tokens { display: contents; }

.evf .evf-input {
	flex: 1 1 140px;
	min-width: 0;
	width: 100%;
	padding: 14px 8px 14px 18px;
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--evf-text);
	background: transparent;
	border: 0;
	border-radius: var(--evf-radius);
	box-shadow: none;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.evf .evf-input:focus,
.evf .evf-input:focus-visible { border: 0; box-shadow: none; outline: none; }
.evf .evf-field.evf-has-tokens .evf-input { padding-left: 8px; }

/* Ausgewählte Zutat: sucht genau diese Zutat. Optik wie aktive Filter-Pillen */
.evf .evf-token {
	display: inline-flex; align-items: center; gap: 2px;
	margin: 7px 0 7px 10px; padding: 3px 3px 3px 12px;
	border-radius: 50px;
	background: var(--evf-gruen-text); color: #fff;
	font-size: 0.82rem; font-weight: 600; line-height: 1.3;
	max-width: calc(100% - 20px);
}
.evf .evf-token-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evf .evf-token-x {
	display: grid; place-items: center; flex: none;
	width: 26px; height: 26px; min-height: 0; padding: 0;
	border: 0; border-radius: 50%;
	background: transparent; color: #fff; cursor: pointer;
	font-family: inherit; font-size: 1rem; line-height: 1;
}
.evf .evf-token-x:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.evf .evf-token-x:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.evf .evf-input::placeholder { color: #75817c; }
.evf .evf-input::-webkit-search-cancel-button { display: none; }

.evf .evf-clear {
	position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
	display: grid; place-items: center;
	background: transparent; color: var(--evf-text-light); cursor: pointer;
}
.evf .evf-clear:hover { background: var(--evf-gruen-bg); color: var(--evf-text); }
.evf .evf-clear svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Autocomplete */
.evf .evf-ac {
	position: absolute; z-index: 9999; left: 0; right: 0; top: calc(100% + 4px);
	margin: 0; padding: 0; list-style: none;
	background: #fff;
	border: 1.5px solid var(--evf-border);
	border-radius: var(--evf-radius);
	box-shadow: var(--evf-shadow-hover);
	max-height: 360px; overflow-y: auto;
}
.evf .evf-ac-head {
	margin: 0; padding: 6px 16px 4px;
	font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
	color: var(--evf-text-light);
	background: var(--evf-gruen-bg);
	border-top: 1px solid var(--evf-border);
}
.evf .evf-ac-head:first-child { border-top: 0; }
.evf .evf-ac-item {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	margin: 0; padding: 10px 16px; min-height: 44px;
	font-size: 0.88rem; color: var(--evf-text); cursor: pointer;
}
.evf .evf-ac-item:hover,
.evf .evf-ac-item[aria-selected="true"] { background: var(--evf-gruen-bg); }
.evf .evf-ac-n { font-size: 0.76rem; color: var(--evf-text-light); white-space: nowrap; }
.evf .evf-ac-frei { font-weight: 600; color: var(--evf-gruen-text); overflow: hidden; text-overflow: ellipsis; }

/* Aktive Filter + Zurücksetzen */
.evf-active { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.evf-active-badge {
	display: inline-flex; align-items: center;
	padding: 5px 14px; border-radius: 50px;
	background: var(--evf-gruen-text); color: #fff;
	font-size: 0.78rem; font-weight: 600;
}
.evf .evf-reset {
	padding: 5px 14px; min-height: 30px;
	background: none; border: 1.5px solid var(--evf-border); border-radius: 50px;
	color: var(--evf-text-light); font-family: inherit; font-size: 0.78rem; cursor: pointer;
	transition: all 0.2s ease;
}
.evf .evf-reset:hover { border-color: var(--evf-gruen); color: var(--evf-gruen-text); background: none; }

/* Filter-Zeile */
.evf-toolbar {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
	gap: 8px; margin-top: 16px;
}
.evf-extras { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-left: auto; }
@media (min-width: 601px) { .evf-extras { flex-shrink: 0; } }

.evf .evf-filter-btn {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 32px; padding: 4px 0;
	background: none; border: 0;
	color: var(--evf-gruen-text); font-family: inherit; font-size: 0.85rem; font-weight: 600;
	cursor: pointer;
}
.evf .evf-filter-btn:hover { background: none; color: var(--evf-text); }
.evf-filter-icon { font-size: 0.7rem; }

@media (max-width: 600px) {
	.evf-toolbar { flex-direction: column; align-items: stretch; }
	.evf-extras { order: -1; margin-left: 0; justify-content: flex-start; }
	.evf .evf-filter-btn { width: 100%; justify-content: space-between; }
}

/* Chips: Favoriten, Überrasch mich, Sortierung, Filter */
.evf .evf-chip,
.evf .evf-pill {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 32px; padding: 6px 14px;
	background: var(--evf-gruen-bg); color: var(--evf-text);
	border: 1.5px solid transparent; border-radius: 50px;
	font-family: inherit; font-size: 0.82rem; font-weight: 400; line-height: 1.3;
	cursor: pointer; transition: all 0.2s ease;
}
.evf .evf-chip { font-weight: 600; }
.evf .evf-chip:hover,
.evf .evf-pill:hover { border-color: var(--evf-gruen); color: var(--evf-gruen-text); background: var(--evf-gruen-bg); }
.evf .evf-chip[aria-pressed="true"],
.evf .evf-pill[aria-pressed="true"] { background: var(--evf-gruen-text); border-color: var(--evf-gruen-text); color: #fff; }

.evf .evf-select {
	width: auto; min-height: 32px; max-width: 220px;
	padding: 6px 30px 6px 14px;
	background-color: var(--evf-gruen-bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2356695c'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px;
	border: 1.5px solid transparent; border-radius: 50px;
	font-family: inherit; font-size: 0.82rem; font-weight: 700; color: var(--evf-text); line-height: 1.4;
	cursor: pointer; -webkit-appearance: none; appearance: none;
}
.evf .evf-select:hover { border-color: var(--evf-gruen); }

/* Herz (Favoriten-Chip und Karten-Button) */
.evf-heart {
	display: inline-block; width: 14px; height: 12px; flex: none;
	background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 86' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 80C50 80 5 50 5 25C5 10 15 3 28 3C38 3 46 9 50 15C54 9 62 3 72 3C85 3 95 10 95 25C95 50 50 80 50 80Z' fill='%23708878'/%3E%3C/svg%3E") center / contain no-repeat;
}
.evf [aria-pressed="true"] > .evf-heart {
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 86' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 80C50 80 5 50 5 25C5 10 15 3 28 3C38 3 46 9 50 15C54 9 62 3 72 3C85 3 95 10 95 25C95 50 50 80 50 80Z' fill='%23ffffff'/%3E%3C/svg%3E");
}

/* Erweiterte Filter */
.evf-filters {
	margin-top: 20px; padding-top: 20px;
	border-top: 1px solid var(--evf-border);
}
.evf-fieldset { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.evf .evf-fieldset legend {
	display: block; margin-bottom: 10px; padding: 0;
	font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
	color: var(--evf-text-light);
}
.evf-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.evf-pill-group { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; width: 100%; }
.evf-pill-group + .evf-pill-group { margin-top: 10px; }
.evf-pill-group-label { width: 100%; font-size: 0.78rem; font-weight: 600; color: var(--evf-text); }

/* ── Ergebnisse ────────────────────────────────────────────────────────── */

.evf .evf-status {
	margin: 0 0 20px;
	font-size: 0.88rem;
	color: var(--evf-text-light);
}

.evf .evf-partial-h {
	margin: 36px 0 16px;
	font-size: 0.88rem; font-weight: 700; line-height: 1.4;
	color: var(--evf-text-light);
}

/* Raster wie die Rezept-Grids: 2 Spalten mobil, 3 auf Tablet, 4 auf Desktop */
.evf ul.evf-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0; padding: 0; list-style: none;
}
@media (min-width: 768px) { .evf ul.evf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .evf ul.evf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ── Karte (wie WP Ultimate Post Grid „ev-simple") ─────────────────────── */

.evf .evf-card {
	position: relative;
	display: flex; flex-direction: column;
	margin: 0;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: #3c3c3b;
	text-align: center;
}

.evf-card-media { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 5px; }
.evf .evf-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.evf-card-noimg { display: block; width: 100%; height: 100%; background: var(--evf-gruen-bg); }

.evf-card-body { padding: 10px; display: flex; flex-direction: column; min-width: 0; }

.evf-card-rating { line-height: 24px; }
.evf-stars { display: inline-flex; gap: 0; vertical-align: middle; }
.evf-star svg {
	display: block; width: 16px; height: 16px;
	fill: none; stroke: #708878; stroke-width: 2; stroke-linejoin: round;
}
.evf-star--full svg { fill: #708878; }
.evf-card-rating-details { display: block; font-size: 0.8em; font-weight: 300; line-height: 24px; }
.evf-star-inline { color: #e6a700; }

.evf .evf-card h3.evf-card-title {
	margin: 0;
	padding: 10px;
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	color: #3c3c3b;
	hyphens: auto; -webkit-hyphens: auto;
	hyphenate-limit-chars: 10 5 5;
	-webkit-hyphenate-limit-before: 5;
	-webkit-hyphenate-limit-after: 5;
	overflow-wrap: normal; word-break: normal;
	text-wrap: balance;
}
.evf .evf-card a.evf-card-link { color: inherit; text-decoration: none; }
/* Ganze Karte klickbar, Link-Text bleibt der Rezepttitel */
.evf-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 8px; }
/* Kein Rahmen um den Titel nach Antippen (Astra/Safari zeichnen sonst einen um den
   zuletzt getippten Link); Tastaturfokus zeigt den Rahmen um die ganze Karte */
.evf .evf-card a.evf-card-link:focus,
.evf .evf-card a.evf-card-link:focus-visible { outline: none; box-shadow: none; }
.evf .evf-card a.evf-card-link:focus-visible::after { box-shadow: var(--evf-focus); }

/* Schmale Kacheln (2 Spalten auf dem Handy) */
@media (max-width: 480px) {
	.evf-card-body { padding: 6px 4px 8px; }
	.evf .evf-card h3.evf-card-title { padding: 6px 4px; font-size: 15px; line-height: 1.35; }
}

/* Merken: kleines Herz auf dem Bild (nur im Rezeptfinder, für die Favoriten) */
.evf .evf-fav {
	position: absolute; z-index: 2; top: 8px; right: 8px;
	width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
	cursor: pointer;
}
.evf .evf-fav:hover { background: #fff; }
.evf .evf-fav .evf-heart { width: 18px; height: 16px; }
.evf .evf-fav[aria-pressed="true"] { background: var(--evf-gruen-text); box-shadow: 0 2px 8px rgba(112, 135, 120, 0.4); }

/* Mehr laden */
.evf-more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.evf .evf-more {
	padding: 10px 22px; min-height: 40px;
	background: var(--evf-gruen-bg); color: var(--evf-text);
	border: 1.5px solid transparent; border-radius: 50px;
	font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.evf .evf-more:hover { border-color: var(--evf-gruen); color: var(--evf-gruen-text); background: var(--evf-gruen-bg); }

/* Keine Treffer */
.evf-empty { padding: 60px 20px; text-align: center; color: var(--evf-text-light); }
.evf-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.evf .evf-empty p { margin: 0 0 16px; font-size: 0.9rem; }
.evf .evf-wunsch-trigger {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 20px; min-height: 40px;
	background: var(--evf-gruen-text); color: #fff;
	border: 0; border-radius: 50px;
	font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.evf .evf-wunsch-trigger:hover { background: #46574c; color: #fff; }

/* ── Wunsch-Dialog ─────────────────────────────────────────────────────── */

.evf .evf-dialog {
	width: min(460px, calc(100vw - 40px));
	padding: 32px 28px 28px;
	border: 0; border-radius: 18px;
	box-shadow: 0 12px 50px rgba(0, 0, 0, 0.18);
	color: var(--evf-text);
}
.evf-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.evf .evf-dialog-close {
	position: absolute; top: 10px; right: 12px;
	width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
	background: none; color: var(--evf-text-light);
	font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.evf .evf-dialog-close:hover { background: var(--evf-gruen-bg); color: var(--evf-text); }
.evf .evf-dialog h2 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; color: var(--evf-text); }
.evf .evf-dialog p { margin: 0 0 20px; font-size: 0.85rem; line-height: 1.6; color: var(--evf-text-light); }
.evf .evf-dialog-label {
	display: block; margin-bottom: 6px;
	font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
	color: var(--evf-text-light);
}
.evf .evf-dialog :is(textarea, input[type="text"]) {
	width: 100%; margin-bottom: 14px; padding: 11px 14px;
	border: 1.5px solid var(--evf-border); border-radius: 8px;
	font-family: inherit; font-size: 0.9rem; color: var(--evf-text); background: #fff;
	resize: none; outline: none;
}
.evf .evf-dialog :is(textarea, input[type="text"]):focus { border-color: var(--evf-gruen); }
.evf .evf-dialog :is(textarea, input[type="text"])::placeholder { color: #75817c; }
.evf .evf-dialog-msg { margin: -4px 0 12px; color: #a3261b; font-weight: 600; }
.evf .evf-dialog-msg:empty { display: none; }
.evf .evf-dialog-submit {
	width: 100%; padding: 13px;
	background: var(--evf-gruen-text); color: #fff;
	border: 0; border-radius: 50px;
	font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.evf .evf-dialog-submit:hover { background: #46574c; color: #fff; }
.evf .evf-dialog-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.evf-dialog-done { padding: 16px 0 8px; text-align: center; }
.evf-dialog-done-icon { font-size: 2.8rem; margin-bottom: 12px; }
.evf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
