/* Glasbären E-Rechnung – PopUp. Alles unter .gber-popup, damit Divi-Regeln nicht hineinwirken. */

html.gber-offen,
html.gber-offen body {
	overflow: hidden;
}

.gber-popup {
	--gber-akzent: #1d4f91;
	--gber-text: #1f2328;
	--gber-leise: #59636e;
	--gber-linie: #d0d7de;
	--gber-fehler: #b42318;
	--gber-flaeche: #ffffff;
	--gber-feldflaeche: #f6f8fa;

	box-sizing: border-box;
	width: min(760px, calc(100vw - 24px));
	max-width: none;
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: var(--gber-flaeche);
	color: var(--gber-text);
	box-shadow: 0 24px 64px rgba(16, 24, 40, 0.28);
	overflow: auto;
	overscroll-behavior: contain;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}

.gber-popup[open] {
	animation: gber-auf 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gber-popup::backdrop {
	background: rgba(16, 24, 40, 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

@keyframes gber-auf {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.gber-popup[open] { animation: none; }
}

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

.gber-popup .gber-rahmen {
	position: relative;
	padding: 36px 40px 32px;
}

.gber-popup .gber-zu {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--gber-leise);
	font-size: 30px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
}

.gber-popup .gber-zu:hover {
	background: var(--gber-feldflaeche);
	color: var(--gber-text);
}

.gber-popup .gber-titel {
	margin: 0 40px 12px 0;
	padding: 0;
	color: var(--gber-text);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
}

.gber-popup p {
	margin: 0 0 10px;
	padding: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.gber-popup .gber-einleitung {
	color: var(--gber-leise);
	margin-bottom: 24px;
}

.gber-popup .gber-gruppe {
	margin: 0 0 24px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.gber-popup .gber-ueberschrift {
	display: block;
	width: 100%;
	margin: 0 0 12px;
	padding: 0 0 8px;
	border-bottom: 1px solid var(--gber-linie);
	color: var(--gber-text);
	font-size: 17px;
	font-weight: 700;
}

.gber-popup .gber-raster {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 18px;
}

.gber-popup .gber-feld {
	min-width: 0;
}

.gber-popup .gber-breit {
	grid-column: 1 / -1;
}

.gber-popup .gber-feld > label {
	display: block;
	margin: 0 0 5px;
	color: var(--gber-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.gber-popup .gber-stern {
	margin-left: 2px;
	color: var(--gber-fehler);
}

.gber-popup .gber-sr,
.gber-popup .gber-falle {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.gber-popup input[type="text"],
.gber-popup input[type="email"],
.gber-popup input[type="tel"],
.gber-popup textarea {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--gber-linie);
	border-radius: 8px;
	background: var(--gber-feldflaeche);
	box-shadow: none;
	color: var(--gber-text);
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
	-webkit-appearance: none;
	appearance: none;
}

.gber-popup textarea {
	min-height: 84px;
	resize: vertical;
}

.gber-popup input[type="text"]:focus,
.gber-popup input[type="email"]:focus,
.gber-popup input[type="tel"]:focus,
.gber-popup textarea:focus {
	outline: none;
	border-color: var(--gber-akzent);
	background: #fff;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gber-akzent) 22%, transparent);
}

.gber-popup [aria-invalid="true"] {
	border-color: var(--gber-fehler) !important;
}

.gber-popup .gber-option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 8px;
	padding: 10px 12px;
	border: 1px solid var(--gber-linie);
	border-radius: 8px;
	color: var(--gber-text);
	font-size: 15px;
	font-weight: 400;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.gber-popup .gber-option:hover {
	border-color: var(--gber-akzent);
}

.gber-popup .gber-option:has(input:checked) {
	border-color: var(--gber-akzent);
	background: color-mix(in srgb, var(--gber-akzent) 7%, #fff);
}

.gber-popup .gber-option input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--gber-akzent);
	cursor: pointer;
}

.gber-popup .gber-auswahl[aria-invalid="true"] .gber-option {
	border-color: var(--gber-fehler);
}

.gber-popup .gber-zustimmung .gber-option {
	border: 0;
	padding: 0;
}

.gber-popup .gber-zustimmung .gber-option:has(input:checked) {
	background: transparent;
}

.gber-popup .gber-fehler {
	margin: 5px 0 0;
	color: var(--gber-fehler);
	font-size: 13px;
	font-weight: 600;
}

.gber-popup .gber-meldung {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-left: 4px solid var(--gber-fehler);
	border-radius: 6px;
	background: #fef3f2;
	color: var(--gber-fehler);
	font-size: 15px;
	font-weight: 600;
}

.gber-popup [hidden] {
	display: none !important;
}

.gber-popup .gber-pflichthinweis,
.gber-popup .gber-datenschutz {
	color: var(--gber-leise);
	font-size: 13px;
}

.gber-popup .gber-datenschutz a,
.gber-popup .gber-zustimmung a {
	color: var(--gber-akzent);
	text-decoration: underline;
}

.gber-popup .gber-schluss {
	margin-top: 18px;
}

.gber-popup .gber-aktionen {
	margin-top: 20px;
	display: flex;
	justify-content: flex-end;
}

.gber-popup .gber-knopf {
	display: inline-block;
	min-width: 160px;
	margin: 0;
	padding: 12px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--gber-akzent);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
	transition: filter 0.15s, transform 0.1s;
}

.gber-popup .gber-knopf:hover {
	filter: brightness(1.1);
}

.gber-popup .gber-knopf:active {
	transform: translateY(1px);
}

.gber-popup .gber-knopf:focus-visible,
.gber-popup .gber-zu:focus-visible,
.gber-popup .gber-option input:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--gber-akzent) 45%, transparent);
	outline-offset: 2px;
}

.gber-popup .gber-knopf[disabled] {
	opacity: 0.65;
	cursor: wait;
}

.gber-popup .gber-erfolg {
	padding: 20px 0 4px;
	outline: none;
}

@media (max-width: 640px) {
	.gber-popup {
		width: 100vw;
		max-height: 100vh;
		max-height: 100dvh;
		border-radius: 0;
	}

	.gber-popup .gber-rahmen {
		padding: 28px 18px 24px;
	}

	.gber-popup .gber-titel {
		font-size: 22px;
	}

	.gber-popup .gber-raster {
		grid-template-columns: 1fr;
	}

	.gber-popup .gber-aktionen .gber-knopf {
		width: 100%;
	}
}
