/**
 * Gutscheinkauf [ea_voucher]. Alles unter .eav gescoped; Akzent, Hintergrund, Text und Rundung wie die Buchungsstrecke
 * aus den Einstellungen der Team-Events (Inline-Stil im Shortcode).
 */

.eav {
	--eav-akzent: #e02b20;
	--eav-bg: #000000;
	--eav-text: #ffffff;
	--eav-radius: 10px;
	--eav-linie: rgba( 255, 255, 255, .22 );
	--eav-linie: color-mix( in srgb, var( --eav-text ) 24%, transparent );
	--eav-grau: #b8b8b8;
	--eav-grau: color-mix( in srgb, var( --eav-text ) 72%, var( --eav-bg ) );
	--eav-flaeche: #151515;
	--eav-flaeche: color-mix( in srgb, var( --eav-text ) 8%, var( --eav-bg ) );

	max-width: 720px;
	color: var( --eav-text );
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}

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

.eav h2 {
	margin: 0 0 8px;
	font-size: clamp( 21px, 2.2vw, 26px );
	color: inherit;
}

.eav h3 {
	margin: 22px 0 10px;
	font-size: 18px;
	color: inherit;
}

.eav .eav-klein {
	display: block;
	color: var( --eav-grau );
	font-size: 14px;
}

.eav .eav-betraege {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.eav .eav-betrag {
	position: relative;
	cursor: pointer;
}

.eav .eav-betrag input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.eav .eav-betrag span {
	display: inline-block;
	min-width: 84px;
	padding: 10px 16px;
	text-align: center;
	font-weight: 700;
	background: var( --eav-flaeche );
	border: 2px solid var( --eav-linie );
	border-radius: var( --eav-radius );
}

.eav .eav-betrag input:checked + span {
	border-color: var( --eav-akzent );
}

.eav .eav-betrag input:focus-visible + span {
	outline: 2px solid var( --eav-text );
	outline-offset: 2px;
}

.eav .eav-feld {
	margin: 0 0 12px;
}

.eav .eav-feld label {
	display: block;
	margin: 0 0 4px;
	font-weight: 600;
}

.eav .eav-zeile {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 12px;
}

/* Rabattcode und Knopf „Einlösen“ (ab 0.58.0): auch am Handy nebeneinander, der Knopf unten bündig mit dem Feld. */
.eav .eav-zeile.eav-code {
	grid-template-columns: 1fr auto;
	align-items: end;
}

.eav button.eav-pruefen {
	padding: 10px 16px;
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
	border-radius: var( --eav-radius );
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* PLZ und Ort: auch am Handy nebeneinander, die PLZ schmal. */
.eav .eav-zeile.eav-ort {
	grid-template-columns: 8em 1fr;
}

.eav input[type="text"],
.eav input[type="email"],
.eav textarea {
	width: 100%;
	margin: 0;
	padding: 11px 12px;
	background: #fff;
	color: #111;
	border: 2px solid var( --eav-linie );
	border-radius: calc( var( --eav-radius ) / 2 );
	font: inherit;
}

.eav .eav-fehler input,
.eav .eav-fehler textarea {
	border-color: #d63638;
}

.eav .eav-eigen {
	max-width: 280px;
	margin-top: 10px;
}

.eav .eav-zahlart,
.eav .eav-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 10px;
	cursor: pointer;
}

.eav .eav-zahlart {
	padding: 12px 14px;
	background: var( --eav-flaeche );
	border: 2px solid var( --eav-linie );
	border-radius: var( --eav-radius );
}

/* Eigener Auswahlpunkt je Zahlart (ab 0.53.0): Das Theme blendet native Radioknöpfe aus wie die Checkbox (0.52.0). Das
   echte Feld bleibt bedienbar, nur unsichtbar; gewählt = runder Punkt gefüllt und Rahmen in der Akzentfarbe. */
.eav .eav-zahlart {
	position: relative;
}

.eav .eav-zahlart input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.eav .eav-punkt {
	flex: none;
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	background: var( --eav-bg );
	border: 2px solid var( --eav-text );
	border-radius: 50%;
}

.eav .eav-zahlart input:checked + .eav-punkt {
	border-color: var( --eav-akzent );
}

.eav .eav-zahlart input:checked + .eav-punkt::after {
	content: "";
	position: absolute;
	inset: 3px;
	background: var( --eav-akzent );
	border-radius: 50%;
}

.eav .eav-zahlart:has( input:checked ) {
	border-color: var( --eav-akzent );
}

.eav .eav-zahlart input:focus-visible + .eav-punkt {
	outline: 3px solid var( --eav-akzent );
	outline-offset: 2px;
}

/* Eigenes Kästchen wie im Buchungsfenster (ab 0.52.0): Manche Themes blenden native Checkboxen aus oder machen sie auf
   dunklem Grund unsichtbar. Das echte Feld bleibt bedienbar (Tastatur, Screenreader, Formular), nur unsichtbar. */
.eav .eav-check {
	position: relative;
}

.eav .eav-check input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.eav .eav-kasten {
	flex: none;
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 24px;
	height: 24px;
	margin-top: 1px;
	background: var( --eav-bg );
	border: 2px solid var( --eav-text );
	border-radius: 5px;
}

.eav .eav-check input:checked + .eav-kasten {
	background: var( --eav-akzent );
	border-color: var( --eav-akzent );
}

.eav .eav-check input:checked + .eav-kasten::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 1px;
	width: 7px;
	height: 13px;
	border: solid #fff;
	border-width: 0 3px 3px 0;
	transform: rotate( 45deg );
}

.eav .eav-check input:focus-visible + .eav-kasten {
	outline: 3px solid var( --eav-akzent );
	outline-offset: 2px;
}

.eav .eav-fehler .eav-kasten {
	border-color: #d63638;
}

.eav .eav-check-text {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
}

.eav .eav-check a,
.eav .eav-klein a,
.eav .eav-tabelle a {
	color: inherit;
	text-decoration: underline;
}

.eav .eav-meldung {
	margin: 14px 0;
	padding: 10px 14px;
	border-left: 4px solid #d63638;
	background: var( --eav-flaeche );
}

.eav button.eav-kaufen,
.eav .eav-knopf {
	display: inline-block;
	margin-top: 10px;
	padding: 14px 24px;
	background: var( --eav-akzent );
	color: #fff;
	border: 0;
	border-radius: var( --eav-radius );
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.eav button.eav-kaufen[disabled] {
	opacity: .6;
	cursor: default;
}

.eav .eav-tabelle {
	width: 100%;
	margin: 0 0 16px;
	border-collapse: collapse;
}

.eav .eav-tabelle th,
.eav .eav-tabelle td {
	padding: 8px 12px 8px 0;
	text-align: left;
	border-bottom: 1px solid var( --eav-linie );
}

/* Gegen den Rahmen des Themes (Divi: .entry-content table, th in Dunkelgrau) wie die Statusseite der Buchung (0.23.0).
   :not(#eav-x) hebt die Spezifität über jede Klassen- und ID-Regel eines Themes, ohne !important. */
.eav table.eav-tabelle:not(#eav-x) {
	border: 0;
	background: none;
	box-shadow: none;
}

.eav .eav-tabelle:not(#eav-x) th,
.eav .eav-tabelle:not(#eav-x) td {
	padding: 10px 16px 10px 0;
	background: none;
	border-top: 0;
	border-left: 0;
	border-right: 0;
	border-bottom: 1px solid var( --eav-linie );
	vertical-align: top;
	font-size: 16px;
	line-height: 1.5;
}

.eav .eav-tabelle:not(#eav-x) th {
	width: 38%;
	color: var( --eav-grau );
	font-weight: 600;
}

.eav .eav-tabelle:not(#eav-x) td {
	color: var( --eav-text );
}

@media ( max-width: 480px ) {
	.eav .eav-tabelle:not(#eav-x) th,
	.eav .eav-tabelle:not(#eav-x) td {
		display: block;
		width: auto;
		padding: 0 0 2px;
		border-bottom: 0;
	}

	.eav .eav-tabelle:not(#eav-x) td {
		padding-bottom: 10px;
		border-bottom: 1px solid var( --eav-linie );
	}

	.eav .eav-tabelle:not(#eav-x) tr + tr th {
		padding-top: 10px;
	}
}

.eav .eav-tabelle code {
	font-size: 18px;
	letter-spacing: .06em;
	background: transparent;
	color: inherit;
}

@media ( max-width: 560px ) {
	.eav .eav-zeile {
		grid-template-columns: 1fr;
	}

	.eav .eav-zeile.eav-code {
		grid-template-columns: 1fr auto;
	}
}

/* Motive mit Vorschau (ab 0.60.0). */
.eav .eav-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
}

.eav .eav-motive {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 150px, 1fr ) );
	gap: 12px;
}

.eav .eav-motiv {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.eav .eav-motiv-wahl {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px;
	background: var( --eav-flaeche );
	border: 2px solid var( --eav-linie );
	border-radius: var( --eav-radius );
	cursor: pointer;
}

.eav label.eav-motiv-wahl:has( input:checked ) {
	border-color: var( --eav-akzent );
}

.eav label.eav-motiv-wahl:has( input:focus-visible ) {
	outline: 2px solid var( --eav-akzent );
	outline-offset: 2px;
}

.eav .eav-motiv-wahl input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.eav .eav-motiv-bild {
	display: block;
	aspect-ratio: 297 / 210;
	overflow: hidden;
	border-radius: calc( var( --eav-radius ) / 2 );
	background: #fff;
}

.eav .eav-motiv-bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.eav .eav-motiv-name {
	font-weight: 700;
}

.eav .eav-vorschau-knopf {
	align-self: flex-start;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	font: inherit;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}

.eav.eav-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: none;
	padding: 16px;
	background: rgba( 0, 0, 0, .75 );
}

.eav .eav-popup-inhalt {
	width: min( 960px, 100% );
	max-height: calc( 100vh - 32px );
	overflow: auto;
	padding: 14px 16px 16px;
	background: var( --eav-bg );
	color: var( --eav-text );
	border: 1px solid var( --eav-linie );
	border-radius: var( --eav-radius );
}

.eav .eav-popup-kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 10px;
}

.eav .eav-popup-zu {
	width: 40px;
	height: 40px;
	padding: 0;
	background: none;
	border: 1px solid var( --eav-linie );
	border-radius: 50%;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.eav .eav-blatt {
	position: relative;
	container-type: inline-size;
	margin: 0 0 10px;
	overflow: hidden;
	background: #fff;
	font-family: Helvetica, Arial, sans-serif;
}

.eav .eav-blatt img {
	display: block;
	width: 100%;
	height: auto;
}

.eav .eav-feld-text {
	position: absolute;
	line-height: 1.25;
	white-space: pre-line;
	overflow-wrap: break-word;
}
