/**
 * Waldknechtshof Veranstaltungen – Frontend
 *
 * Modern und zurückhaltend; Schriften kommen vom Theme (Avada). Die Akzentfarbe ist die
 * „Akzentfarbe“ aus den Plugin-Stammdaten. Anpassen über CSS-Variablen, z. B. im Theme:
 *   :root { --wkv-accent: #7a4e2d; --wkv-radius: 0; }
 * Effekte (Anheben, Bild-Zoom, Einblenden) entfallen bei „Bewegung reduzieren“.
 */

.wkv {
	--wkv-accent: #2f5d3a;
	--wkv-accent-contrast: #fff;
	--wkv-text: inherit;
	--wkv-accent-soft: color-mix(in srgb, var(--wkv-accent) 10%, transparent);
	--wkv-accent-strong: color-mix(in srgb, var(--wkv-accent) 82%, #000);
	--wkv-muted: #5a5a5a;
	--wkv-border: #e3e1dc;
	--wkv-surface: #fff;
	--wkv-surface-alt: #f6f5f2;
	--wkv-radius: 12px;
	--wkv-radius-small: 8px;
	--wkv-gap: 1.75rem;
	--wkv-shadow: 0 1px 2px rgba(20, 24, 20, 0.04), 0 4px 18px rgba(20, 24, 20, 0.06);
	--wkv-shadow-hover: 0 2px 4px rgba(20, 24, 20, 0.05), 0 14px 34px rgba(20, 24, 20, 0.12);
	--wkv-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--wkv-duration: 0.35s;
	--wkv-focus: 2px solid var(--wkv-accent);
	--wkv-status-few: #8a5a00;
	--wkv-status-soldout: #a1262c;
	--wkv-font-size-small: 0.875em;
	--wkv-card-image-ratio: 3 / 2;
	/* Höchstzahl Spalten der Gesamtübersicht (weniger, wenn der Platz nicht reicht). */
	--wkv-columns: 3;
	--wkv-card-min: 280px;
	--wkv-hero-image-ratio: 5 / 2;

	color: var(--wkv-text);
	box-sizing: border-box;
	/* Lange Wörter umbrechen statt abschneiden (die Kacheln schneiden Überstehendes ab). */
	overflow-wrap: break-word;
}

.wkv *,
.wkv *::before,
.wkv *::after {
	box-sizing: inherit;
}

.wkv .screen-reader-text,
.wkv-booking-box .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.wkv a:focus-visible,
.wkv button:focus-visible,
.wkv [tabindex]:focus-visible {
	outline: var(--wkv-focus);
	outline-offset: 2px;
}

/* Buttons */
.wkv-button {
	display: inline-flex;
	gap: 0.4em;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.65em 1.35em;
	border: 2px solid var(--wkv-accent);
	border-radius: var(--wkv-radius-small);
	background: var(--wkv-accent);
	color: var(--wkv-accent-contrast);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color var(--wkv-duration) var(--wkv-ease), border-color var(--wkv-duration) var(--wkv-ease), color var(--wkv-duration) var(--wkv-ease), transform var(--wkv-duration) var(--wkv-ease), box-shadow var(--wkv-duration) var(--wkv-ease);
}

.wkv-button:hover,
.wkv-button:focus-visible {
	border-color: var(--wkv-accent-strong);
	background: var(--wkv-accent-strong);
	color: var(--wkv-accent-contrast);
	box-shadow: 0 6px 16px color-mix(in srgb, var(--wkv-accent) 28%, transparent);
	transform: translateY(-1px);
}

.wkv-button:active {
	transform: translateY(0);
	box-shadow: none;
}

.wkv-button[disabled],
.wkv-button[aria-busy="true"] {
	opacity: 0.6;
	cursor: progress;
	transform: none;
	box-shadow: none;
}

.wkv-button--secondary {
	background: transparent;
	color: var(--wkv-accent);
}

.wkv-button--secondary:hover,
.wkv-button--secondary:focus-visible {
	border-color: var(--wkv-accent);
	background: var(--wkv-accent-soft);
	color: var(--wkv-accent-strong);
	box-shadow: none;
}

.wkv-button--external::after {
	content: " ↗";
}

/* Status */
.wkv-status {
	display: inline-flex;
	gap: 0.35em;
	align-items: center;
	padding: 0.2em 0.7em;
	border-radius: 999px;
	background: var(--wkv-surface-alt);
	color: var(--wkv-muted);
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.4;
}

.wkv-status::before {
	content: "";
	width: 0.45em;
	height: 0.45em;
	border-radius: 50%;
	background: currentColor;
}

.wkv-status--available {
	background: var(--wkv-accent-soft);
	color: var(--wkv-accent-strong);
}

.wkv-status--few {
	background: #fdf3e1;
	color: var(--wkv-status-few);
}

.wkv-status--sold-out,
.wkv-status--cancelled {
	background: #fbecec;
	color: var(--wkv-status-soldout);
}

.wkv-empty {
	color: var(--wkv-muted);
}

/* Kachel: ganze Kachel anklickbar (über den Titel-Link), sanftes Anheben und Bild-Zoom beim Überfahren. */
.wkv-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 0;
	border-radius: var(--wkv-radius);
	background: var(--wkv-surface);
	box-shadow: var(--wkv-shadow);
	transition: transform var(--wkv-duration) var(--wkv-ease), box-shadow var(--wkv-duration) var(--wkv-ease);
}

.wkv-card:hover,
.wkv-card:focus-within {
	box-shadow: var(--wkv-shadow-hover);
	transform: translateY(-4px);
}

.wkv-card__media {
	position: relative;
	display: block;
	aspect-ratio: var(--wkv-card-image-ratio);
	overflow: hidden;
	background: var(--wkv-surface-alt);
}

.wkv-card__image,
.wkv-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s var(--wkv-ease);
}

.wkv-card:hover .wkv-card__media img {
	transform: scale(1.05);
}

.wkv-card.is-sold-out .wkv-card__media img,
.wkv-card.is-past .wkv-card__media img,
.wkv-card.is-cancelled .wkv-card__media img {
	filter: grayscale(0.5);
}

/* Datumsplakette auf dem Bild */
.wkv-card__badge {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 3.4rem;
	padding: 0.35rem 0.55rem 0.4rem;
	border-radius: var(--wkv-radius-small);
	background: rgba(255, 255, 255, 0.94);
	color: #1f2420;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	line-height: 1;
	text-align: center;
	backdrop-filter: blur(4px);
}

.wkv-card__badge-day {
	font-size: 1.45rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.wkv-card__badge-month {
	margin-top: 0.2rem;
	color: var(--wkv-accent);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.wkv-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--wkv-surface-alt), var(--wkv-border));
}

.wkv-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.55rem;
	min-width: 0;
	hyphens: auto;
	padding: 1.15rem 1.25rem 1.25rem;
}

.wkv-card__date {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 0.6rem;
	align-items: baseline;
	margin: 0;
	color: var(--wkv-accent);
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.wkv-card__more {
	display: inline-block;
	padding: 0.05em 0.55em;
	border-radius: 999px;
	background: var(--wkv-accent-soft);
	color: var(--wkv-accent-strong);
	font-size: 0.9em;
	font-weight: 600;
}

.wkv-card__title {
	margin: 0;
	font-size: 1.25em;
	line-height: 1.25;
}

.wkv-card__title a {
	color: inherit;
	text-decoration: none;
}

/* Gesamte Kachel klickbar; Knöpfe liegen darüber und bleiben eigenständig bedienbar. */
.wkv-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.wkv-card__title a:focus-visible {
	outline: none;
}

.wkv-card:has(.wkv-card__title a:focus-visible) {
	outline: var(--wkv-focus);
	outline-offset: 3px;
}

.wkv-card__excerpt {
	color: var(--wkv-muted);
}

.wkv-card__excerpt,
.wkv-card__info {
	margin: 0;
}

.wkv-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid var(--wkv-border);
}

.wkv-card__price {
	font-size: 1.05em;
	font-weight: 700;
}

.wkv-card__actions {
	position: relative;
	z-index: 2;
	/* Knopf immer am unteren Rand der Kachel, auch ohne Preiszeile (z. B. externe Veranstaltungen). */
	margin-top: auto;
	padding-top: 0.25rem;
}

.wkv-card__meta + .wkv-card__actions {
	margin-top: 0;
}

.wkv-card__actions .wkv-button {
	width: 100%;
}

.wkv-card.is-past,
.wkv-card.is-cancelled {
	opacity: 0.75;
}

/* Liste / Kacheln */
.wkv-events__list {
	display: grid;
	grid-template-columns: repeat(
		auto-fill,
		minmax(min(100%, max(var(--wkv-card-min), (100% - (var(--wkv-columns) - 1) * var(--wkv-gap)) / var(--wkv-columns))), 1fr)
	);
	gap: var(--wkv-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Mobil (bis 767 px, wie Avada) immer eine Spalte. */
@media (max-width: 767px) {
	.wkv-events__list {
		grid-template-columns: 1fr;
	}
}

/* Ohne min-width: 0 dehnt ein langes Wort die Spalte über die Kachel hinaus. */
.wkv-events__item {
	min-width: 0;
}

.wkv-events--list .wkv-events__list {
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.wkv-events--list .wkv-card {
		flex-direction: row;
	}

	.wkv-events--list .wkv-card__media {
		flex: 0 0 240px;
		aspect-ratio: auto;
	}
}

/* Slider */
.wkv-slider {
	--wkv-visible: var(--wkv-visible-mobile, 1);
	position: relative;
}

/* Mobil (bis 767 px, wie Avada): eine Kachel in voller Breite; ab 768 px Tablet. */
@media (min-width: 768px) {
	.wkv-slider {
		--wkv-visible: var(--wkv-visible-tablet, 2);
	}
}

@media (min-width: 1024px) {
	.wkv-slider {
		--wkv-visible: var(--wkv-visible-desktop, 3);
	}
}

.wkv-slider__track {
	display: grid;
	grid-auto-columns: calc((100% - (var(--wkv-visible) - 1) * var(--wkv-gap)) / var(--wkv-visible));
	grid-auto-flow: column;
	gap: var(--wkv-gap);
	margin: 0;
	padding: 0.25rem 0 1rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	list-style: none;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: thin;
}

.wkv-slider__slide {
	min-width: 0;
	scroll-snap-align: start;
}

.wkv-card--all {
	align-items: center;
	justify-content: center;
	min-height: 12rem;
	padding: 1.5rem;
	color: var(--wkv-accent);
	font-weight: 600;
	text-decoration: none;
	gap: 0.5rem;
}

.wkv-card__all-arrow {
	font-size: 2em;
	line-height: 1;
}

.wkv-slider__controls {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	justify-content: center;
	margin-top: 0.5rem;
}

.wkv-slider [hidden] {
	display: none !important;
}

.wkv-slider__arrow,
.wkv-slider__pause {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--wkv-border);
	border-radius: 50%;
	background: var(--wkv-surface);
	color: var(--wkv-text);
	box-shadow: var(--wkv-shadow);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color var(--wkv-duration) var(--wkv-ease), color var(--wkv-duration) var(--wkv-ease), border-color var(--wkv-duration) var(--wkv-ease);
}

.wkv-slider__arrow:not(:disabled):hover,
.wkv-slider__pause:hover {
	border-color: var(--wkv-accent);
	background: var(--wkv-accent);
	color: var(--wkv-accent-contrast);
}

.wkv-slider__pause {
	font-size: 0.9rem;
}

.wkv-slider__arrow:disabled {
	opacity: 0.4;
	cursor: default;
}

.wkv-slider__dots {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.wkv-slider__dot {
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.wkv-slider__dot::before {
	content: "";
	display: block;
	width: 0.55rem;
	height: 0.55rem;
	margin: auto;
	border-radius: 999px;
	background: color-mix(in srgb, var(--wkv-accent) 30%, transparent);
	transition: width var(--wkv-duration) var(--wkv-ease), background-color var(--wkv-duration) var(--wkv-ease);
}

.wkv-slider__dot[aria-current="true"]::before {
	width: 1.4rem;
	background: var(--wkv-accent);
}

.wkv-slider__all {
	margin: 1rem 0 0;
	text-align: center;
}

/* Kachel "Alle" nur auf größeren Bildschirmen, Button nur mobil – jeweils genau ein Link sichtbar. */
@media (max-width: 639px) {
	.wkv-slider__slide--all {
		display: none;
	}
}

@media (min-width: 640px) {
	.wkv-slider__all {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wkv-slider__track {
		scroll-behavior: auto;
	}
}

/* Einzelansicht */
.wkv-facts {
	display: grid;
	gap: 0.85rem 1.5rem;
	margin: 0 0 1.75rem;
	padding: 1.25rem 1.35rem;
	border-radius: var(--wkv-radius);
	background: var(--wkv-surface-alt);
}

.wkv-facts__row {
	display: grid;
	grid-template-columns: 7.5rem 1fr;
	gap: 1rem;
	align-items: start;
}

.wkv-facts dt {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	font-weight: 600;
	overflow-wrap: anywhere;
	hyphens: auto;
}

/* Schmale Bildschirme: Bezeichnung über dem Wert, damit lange Wörter („Buchungsnummer“) nicht überlappen. */
@media (max-width: 480px) {
	.wkv-facts__row {
		grid-template-columns: 1fr;
		gap: 0;
	}
}

.wkv-facts dd {
	margin: 0;
}

.wkv-facts__address {
	color: var(--wkv-muted);
	font-size: var(--wkv-font-size-small);
}

.wkv-event__title {
	margin-top: 0;
}

.wkv-event__image img,
.wkv-hero__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--wkv-hero-image-ratio);
	object-fit: cover;
	margin-bottom: 1rem;
	border-radius: var(--wkv-radius);
}

.wkv-hero {
	margin: 0 0 var(--wkv-gap);
}

.wkv-hero .wkv-hero__image {
	margin-bottom: 0;
}

/* Auf schmalen Bildschirmen etwas höher, damit das Motiv erkennbar bleibt. */
@media (max-width: 600px) {
	.wkv {
		--wkv-hero-image-ratio: 16 / 9;
	}
}

.wkv-booking-box {
	margin: 2.25rem 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 0;
	border-top: 4px solid var(--wkv-accent);
	border-radius: var(--wkv-radius);
	background: var(--wkv-surface);
	box-shadow: var(--wkv-shadow);
	scroll-margin-top: 6rem;
}

.wkv-booking-box__title {
	margin-top: 0;
}

.wkv-dates {
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.wkv-dates__item {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--wkv-border);
}

.wkv-booking-box__date {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.wkv-prices {
	width: 100%;
	margin: 1rem 0;
	border-collapse: collapse;
}

.wkv-prices th,
.wkv-prices td {
	padding: 0.5rem;
	border-bottom: 1px solid var(--wkv-border);
	text-align: left;
	vertical-align: top;
}

.wkv-prices thead th {
	font-size: var(--wkv-font-size-small);
	color: var(--wkv-muted);
}

.wkv-prices__desc,
.wkv-prices__tier {
	display: block;
	color: var(--wkv-muted);
	font-size: var(--wkv-font-size-small);
	font-weight: 400;
}

/* Kalender */
.wkv-calendar__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.wkv-calendar__title {
	margin: 0;
	font-size: 1.3em;
}

.wkv-calendar__nav a {
	display: inline-flex;
	gap: 0.35em;
	align-items: center;
	padding: 0.45em 0.9em;
	border: 1px solid var(--wkv-border);
	border-radius: 999px;
	color: inherit;
	font-size: 0.9em;
	font-weight: 600;
	text-decoration: none;
	transition: border-color var(--wkv-duration) var(--wkv-ease), background-color var(--wkv-duration) var(--wkv-ease);
}

.wkv-calendar__nav a:hover {
	border-color: var(--wkv-accent);
	background: var(--wkv-accent-soft);
}

.wkv-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--wkv-border);
	border-radius: var(--wkv-radius);
	background: var(--wkv-border);
	box-shadow: var(--wkv-shadow);
	list-style: none;
}

.wkv-calendar__weekday {
	padding: 0.6rem 0.4rem;
	background: var(--wkv-surface);
	color: var(--wkv-muted);
	font-size: 0.8em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

.wkv-calendar__day {
	min-width: 0;
	min-height: 6.5rem;
	padding: 0.45rem;
	background: var(--wkv-surface);
}

.wkv-calendar__day.is-outside {
	background: var(--wkv-surface-alt);
}

.wkv-calendar__num {
	color: var(--wkv-muted);
	font-size: 0.85em;
	font-weight: 600;
}

.wkv-calendar__day.is-today .wkv-calendar__num {
	display: inline-block;
	min-width: 1.6em;
	border-radius: 999px;
	background: var(--wkv-accent);
	color: var(--wkv-accent-contrast);
	text-align: center;
}

.wkv-calendar__full {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.wkv-calendar__events {
	margin: 0.25rem 0 0;
	padding: 0;
	font-size: var(--wkv-font-size-small);
	list-style: none;
}

.wkv-calendar__event {
	margin-bottom: 0.3rem;
	padding: 0.25rem 0.4rem 0.3rem;
	border-left: 3px solid var(--wkv-accent);
	border-radius: 0 6px 6px 0;
	background: var(--wkv-accent-soft);
	line-height: 1.3;
	transition: background-color var(--wkv-duration) var(--wkv-ease);
}

.wkv-calendar__event:hover {
	background: color-mix(in srgb, var(--wkv-accent) 18%, transparent);
}

.wkv-calendar__event a {
	display: -webkit-box;
	overflow: hidden;
	color: inherit;
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: break-word;
	hyphens: auto;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.wkv-calendar__time {
	display: block;
	color: var(--wkv-accent-strong);
	font-size: 0.9em;
}

.wkv-calendar__event.is-sold-out,
.wkv-calendar__event.is-past,
.wkv-calendar__event.is-cancelled {
	border-left-color: #b9b5ad;
	background: var(--wkv-surface-alt);
	color: var(--wkv-muted);
}

.wkv-calendar__event .wkv-status {
	display: block;
	margin-top: 0.15rem;
	padding: 0;
	background: none;
	font-size: 0.8em;
	line-height: 1.25;
	hyphens: auto;
}

.wkv-calendar__event .wkv-status::before {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-right: 0.3em;
	vertical-align: 0.05em;
}

/* Sehr schmale Tageszellen: Status nur als farbiger Punkt (Text bleibt für Screenreader). */
.wkv-calendar__day {
	container-type: inline-size;
}

@container (max-width: 120px) {
	.wkv-calendar__events {
		font-size: 0.8rem;
	}

	.wkv-calendar__event .wkv-status {
		position: absolute;
		top: 0.35rem;
		right: 0.35rem;
		margin: 0;
		font-size: 0;
	}

	.wkv-calendar__event {
		position: relative;
		padding-right: 1rem;
	}
}

/* Kalender mobil als Liste: nur Tage mit Veranstaltungen. */
@media (max-width: 767px) {
	.wkv-calendar__grid {
		display: block;
		border: 0;
		background: none;
	}

	.wkv-calendar__weekday,
	.wkv-calendar__day.is-outside,
	.wkv-calendar__day:not(.has-events) {
		display: none;
	}

	.wkv-calendar__day {
		min-height: 0;
		padding: 0.75rem 0;
		border-bottom: 1px solid var(--wkv-border);
	}

	.wkv-calendar__num {
		display: none;
	}

	.wkv-calendar__full {
		position: static;
		width: auto;
		height: auto;
		clip: auto;
		font-weight: 600;
	}
}

/* Buchungsformular */
.wkv-form {
	--wkv-input-border: #8a8a8a;
	--wkv-error: #a1262c;
	--wkv-success: #2f5d3a;
	margin-top: 1.5rem;
}

.wkv-form .wkv-label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.wkv-form input[type="text"],
.wkv-form input[type="email"],
.wkv-form input[type="tel"],
.wkv-form input[type="number"],
.wkv-form select,
.wkv-form textarea {
	width: 100%;
	max-width: 100%;
	min-height: 2.75rem;
	padding: 0.55em 0.75em;
	border: 1px solid var(--wkv-input-border);
	border-radius: var(--wkv-radius-small);
	transition: border-color var(--wkv-duration) var(--wkv-ease), box-shadow var(--wkv-duration) var(--wkv-ease);
	background: #fff;
	color: #222;
	font: inherit;
}

.wkv-form .wkv-qty__input {
	width: 5.5em;
}

.wkv-form input[type="text"]:hover,
.wkv-form input[type="email"]:hover,
.wkv-form input[type="tel"]:hover,
.wkv-form select:hover,
.wkv-form textarea:hover {
	border-color: #5f5f5f;
}

.wkv-form input:focus-visible,
.wkv-form select:focus-visible,
.wkv-form textarea:focus-visible {
	border-color: var(--wkv-accent);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wkv-accent) 30%, transparent);
}

.wkv-form [aria-invalid="true"] {
	border-color: var(--wkv-error);
	box-shadow: 0 0 0 1px var(--wkv-error);
}

.wkv-field {
	margin: 0 0 1rem;
}

.wkv-field__error {
	display: block;
	margin-top: 0.25rem;
	color: var(--wkv-error);
	font-size: var(--wkv-font-size-small);
	font-weight: 600;
}

.wkv-optional,
.wkv-hint,
.wkv-qty__desc,
.wkv-qty__avail,
.wkv-qty__tier,
.wkv-summary__unit {
	color: var(--wkv-muted);
	font-size: var(--wkv-font-size-small);
	font-weight: 400;
}

.wkv-qty__desc,
.wkv-qty__avail,
.wkv-qty__tier {
	display: block;
}

.wkv-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 0 1rem;
}

.wkv-step {
	margin: 0 0 1.5rem;
	padding: 1rem 0 0;
	border: 0;
	border-top: 1px solid var(--wkv-border);
	min-width: 0;
}

.wkv-form.is-stepped .wkv-step {
	padding-top: 0.25rem;
	border-top: 0;
	animation: wkv-step-in 0.35s var(--wkv-ease);
}

.wkv-step[hidden] {
	display: none;
}

.wkv-step__title {
	padding: 0;
	font-size: 1.1em;
	font-weight: 700;
}

.wkv-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6em;
	height: 1.6em;
	margin-right: 0.35em;
	border-radius: 50%;
	background: var(--wkv-accent);
	color: var(--wkv-accent-contrast);
	font-size: 0.85em;
}

.wkv-step__nav,
.wkv-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1rem;
}

.wkv-form__actions [hidden] {
	display: none;
}

.wkv-choice {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin: 0.35rem 0;
	font-weight: 400;
}

.wkv-choice input {
	width: 1.15em;
	height: 1.15em;
	margin: 0;
	accent-color: var(--wkv-accent);
}

.wkv-field--terms .wkv-choice {
	flex-wrap: nowrap;
	align-items: flex-start;
}

.wkv-field--terms .wkv-choice input {
	margin-top: 0.2em;
	flex: 0 0 auto;
}

.wkv-qty {
	width: 100%;
	border-collapse: collapse;
}

.wkv-qty th,
.wkv-qty td {
	padding: 0.6rem 0.5rem;
	border-bottom: 1px solid var(--wkv-border);
	text-align: left;
	vertical-align: top;
}

.wkv-qty thead th {
	color: var(--wkv-muted);
	font-size: var(--wkv-font-size-small);
}

.wkv-qty td:last-child {
	width: 7em;
}

.wkv-live-total {
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
	border-radius: var(--wkv-radius-small);
	background: var(--wkv-accent-soft);
	font-size: 1.1em;
	font-weight: 700;
	text-align: right;
}

.wkv-summary__table {
	width: 100%;
	margin: 0 0 1rem;
	border-collapse: collapse;
}

.wkv-summary__table th,
.wkv-summary__table td {
	padding: 0.4rem 0.5rem;
	border-bottom: 1px solid var(--wkv-border);
	text-align: left;
	font-weight: 400;
}

.wkv-summary__table td {
	text-align: right;
	white-space: nowrap;
}

.wkv-summary__total th,
.wkv-summary__total td {
	border-top: 2px solid currentColor;
	font-weight: 700;
}

.wkv-legal {
	padding: 0.75rem;
	border-left: 3px solid var(--wkv-border);
	background: var(--wkv-surface-alt);
	font-size: var(--wkv-font-size-small);
}

.wkv-notice {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-left: 4px solid var(--wkv-accent);
	border-radius: var(--wkv-radius);
	background: var(--wkv-surface-alt);
}

.wkv-notice p,
.wkv-notice ul {
	margin: 0.25rem 0;
}

.wkv-notice--error {
	border-left-color: var(--wkv-status-soldout);
	background: #fbeeee;
}

.wkv-notice--success {
	border-left-color: #2f5d3a;
	background: #eef6ef;
}

.wkv-notice--info {
	border-left-color: #2271b1;
	background: #eef4fa;
}

.wkv-notice--sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

/* Honeypot: für Menschen unsichtbar, aber nicht display:none (manche Bots ignorieren das). */
.wkv-hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wkv-thanks {
	padding: 1rem;
	border-left: 4px solid var(--wkv-accent);
	background: var(--wkv-surface-alt);
}

.wkv-thanks:focus {
	outline: var(--wkv-focus);
}

.wkv-thanks__title {
	margin-top: 0;
}

.wkv-guest__cancel {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wkv-border);
}

@media (max-width: 480px) {
	.wkv-qty thead {
		display: none;
	}

	.wkv-qty tr {
		display: grid;
		grid-template-columns: 1fr auto;
		border-bottom: 1px solid var(--wkv-border);
	}

	.wkv-qty th,
	.wkv-qty td {
		border: 0;
	}

	.wkv-qty th {
		grid-column: 1 / -1;
		padding-bottom: 0;
	}
}

.wkv-choice__text {
	flex: 1;
	min-width: 0;
}

/* Bestätigungsseite (Buchung per E-Mail bestätigen) */
.wkv-guest__confirm {
	margin-bottom: 1.5rem;
}

/* ---------- Infobox: Symbole ---------- */
.wkv-facts__icon {
	flex: 0 0 auto;
	width: 1.15em;
	height: 1.15em;
	color: var(--wkv-accent);
}

/* ---------- Mengenwähler (− / +), per JavaScript um das Zahlenfeld gelegt ---------- */
.wkv-stepper {
	display: inline-flex;
	align-items: stretch;
	overflow: hidden;
	border: 1px solid var(--wkv-input-border, #8a8a8a);
	border-radius: var(--wkv-radius-small);
	background: #fff;
}

.wkv-stepper:focus-within {
	border-color: var(--wkv-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wkv-accent) 30%, transparent);
}

.wkv-form .wkv-stepper .wkv-qty__input {
	width: 3.2em;
	min-height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-weight: 700;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.wkv-stepper .wkv-qty__input::-webkit-outer-spin-button,
.wkv-stepper .wkv-qty__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.wkv-stepper__btn {
	width: 2.75rem;
	padding: 0;
	border: 0;
	background: var(--wkv-surface-alt);
	color: var(--wkv-accent-strong);
	font-family: inherit;
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color var(--wkv-duration) var(--wkv-ease), color var(--wkv-duration) var(--wkv-ease);
}

.wkv-stepper__btn:hover:not(:disabled) {
	background: var(--wkv-accent);
	color: var(--wkv-accent-contrast);
}

.wkv-stepper__btn:disabled {
	color: #b5b5b5;
	cursor: default;
}

.wkv-form .wkv-qty td:last-child {
	width: auto;
	white-space: nowrap;
}

/* ---------- Fortschrittsanzeige der Buchungsschritte ---------- */
.wkv-progress {
	display: flex;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
	counter-reset: wkv-progress;
}

.wkv-progress__item {
	flex: 1 1 0;
	min-width: 0;
	padding-top: 0.6rem;
	border-top: 4px solid var(--wkv-border);
	color: var(--wkv-muted);
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.3;
	transition: border-color var(--wkv-duration) var(--wkv-ease), color var(--wkv-duration) var(--wkv-ease);
}

.wkv-progress__item.is-done,
.wkv-progress__item[aria-current="step"] {
	border-top-color: var(--wkv-accent);
	color: var(--wkv-text);
}

.wkv-progress__item[aria-current="step"] {
	color: var(--wkv-accent-strong);
}

.wkv-progress__num {
	display: block;
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
}

/* Schmale Bildschirme: nur Balken, Beschriftung nur beim aktuellen Schritt. */
@media (max-width: 560px) {
	.wkv-progress__item {
		font-size: 0;
	}

	.wkv-progress__item[aria-current="step"] {
		flex-grow: 3;
		overflow: hidden;
		font-size: 0.85rem;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.wkv-progress__item[aria-current="step"] .wkv-progress__num {
		display: inline;
		margin-right: 0.35em;
	}

	.wkv-progress__item[aria-current="step"] .wkv-progress__num::after {
		content: " ·";
	}
}

/* Im Schritt-Modus übernimmt die Fortschrittsanzeige die Nummerierung. */
.wkv-form.is-stepped .wkv-step__num {
	display: none;
}

@keyframes wkv-step-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- Menükarte [wkv_menu] ---------- */
.wkv-menu {
	position: relative;
	/* Keine automatische Silbentrennung: wirkt auf einer Menükarte unruhig. Überlange Wörter brechen trotzdem um. */
	hyphens: manual;
	max-width: 36rem;
	margin: 2.5rem auto;
	padding: 2.75rem 2.25rem 3.25rem;
	text-align: center;
	background: var(--wkv-surface-alt);
	border-radius: var(--wkv-radius);
}

/* Feiner Innenrahmen wie bei einer gedruckten Menükarte. */
.wkv-menu::before {
	content: "";
	position: absolute;
	inset: 10px;
	border: 1px solid color-mix(in srgb, var(--wkv-accent) 30%, transparent);
	border-radius: calc(var(--wkv-radius) - 4px);
	pointer-events: none;
}

.wkv-menu .wkv-menu__title {
	margin: 0;
	font-family: var(--wkv-menu-title-font, inherit);
	font-size: var(--wkv-menu-title-size, 1.6em);
	font-weight: var(--wkv-menu-title-weight, inherit);
	/* Dunkle Stufe der Akzentfarbe (beim Waldknechtshof ein Tannengrün); im Theme überschreibbar. */
	color: var(--wkv-menu-title-color, var(--wkv-accent-strong));
	line-height: 1.3;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	text-wrap: balance;
}

/* Linie – Punkt – Linie unter der Überschrift. */
.wkv-menu__ornament {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	min-height: 8px;
	margin: 1rem auto 0;
	color: var(--wkv-accent);
	background: radial-gradient(circle, currentColor 0 3px, transparent 3.5px) center / 8px 8px no-repeat;
}

.wkv-menu__ornament::before,
.wkv-menu__ornament::after {
	content: "";
	width: 3.5rem;
	height: 1px;
	background: currentColor;
	opacity: 0.45;
}

.wkv-menu .wkv-menu__courses {
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
}

.wkv-menu .wkv-menu__course {
	margin: 0;
	padding: 0;
}

/* Raute zwischen den Gängen statt „***“. */
.wkv-menu__course + .wkv-menu__course::before {
	content: "";
	display: block;
	width: 6px;
	height: 6px;
	margin: 1.15rem auto;
	background: var(--wkv-accent);
	opacity: 0.6;
	transform: rotate(45deg);
}

.wkv-menu__dish {
	display: block;
	font-size: 1.08em;
	font-weight: 600;
	line-height: 1.4;
}

.wkv-menu__description {
	display: block;
	margin-top: 0.25rem;
	color: var(--wkv-muted);
	font-style: italic;
	line-height: 1.5;
}

.wkv-menu .wkv-menu__note {
	margin: 2rem auto 0;
	padding-top: 1.25rem;
	max-width: 28rem;
	border-top: 1px solid var(--wkv-border);
	font-weight: 600;
}

@media (max-width: 600px) {
	.wkv-menu {
		margin: 2rem 0;
		padding: 2.25rem 1.25rem 2.75rem;
	}
}

/* ---------- Kennzeichnung KI-Bild ---------- */
.wkv-ai-figure {
	position: relative;
	display: block;
	height: 100%;
}

.wkv-ai-badge {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 1;
	padding: 2px 7px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 11px;
	line-height: 1.5;
	letter-spacing: 0.02em;
	pointer-events: none;
}

/* ---------- Theme-Angaben auf der Veranstaltungsseite ---------- */
/* Autor, Datum, Kommentare und Autorenbox (Avada) gehören zu Blogbeiträgen, nicht zu Veranstaltungen. */
.single-wkv_event .fusion-meta-info,
.single-wkv_event .about-author {
	display: none;
}

/* Beitragsbild von Avada oben auf der Detailseite: immer im Header-Format (wie .wkv-hero__image),
   egal in welchem Format das Bild hochgeladen wurde. */
.single-wkv_event .fusion-post-slideshow img.wp-post-image {
	width: 100%;
	height: auto;
	aspect-ratio: 5 / 2;
	object-fit: cover;
}

@media (max-width: 600px) {
	.single-wkv_event .fusion-post-slideshow img.wp-post-image {
		aspect-ratio: 16 / 9;
	}
}

/* Wichtiger Bildteil (Feld im Veranstaltungsbild): Zuschnitt oben bzw. unten statt mittig. */
img[data-wkv-focus="top"] {
	object-position: 50% 0;
}

img[data-wkv-focus="bottom"] {
	object-position: 50% 100%;
}

/* ---------- Einblenden beim Scrollen (wie die dezenten Avada-Animationen) ---------- */
.wkv-reveal-ready .wkv-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s var(--wkv-ease), transform 0.6s var(--wkv-ease);
	transition-delay: var(--wkv-delay, 0s);
}

.wkv-reveal-ready .wkv-reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.wkv-card,
	.wkv-card__media img,
	.wkv-button,
	.wkv-reveal-ready .wkv-reveal,
	.wkv-form.is-stepped .wkv-step {
		animation: none !important;
		transition: none !important;
	}

	.wkv-card:hover,
	.wkv-card:focus-within,
	.wkv-button:hover,
	.wkv-button:focus-visible {
		transform: none;
	}

	.wkv-card:hover .wkv-card__media img {
		transform: none;
	}

	.wkv-reveal-ready .wkv-reveal {
		opacity: 1;
		transform: none;
	}
}

@media print {
	.wkv-reveal-ready .wkv-reveal {
		opacity: 1;
		transform: none;
	}
}
