/*
 * cvrt Legal accessibility tool. Every rule on the tool itself is anchored on
 * #cvrt-a11y so theme and Elementor kit styles for bare buttons and links
 * (0,1,1) cannot restyle it. Every rule on the page excludes the tool, so a
 * visitor who enlarges or inverts the page can still operate the panel.
 */

/* -- the tool ------------------------------------------------------------- */

#cvrt-a11y {
	--cvrt-a11y-color: #1d4ed8;
	position: fixed;
	z-index: 2147483647;
	font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: #111;
}

#cvrt-a11y.cvrt-a11y--bottom-right { right: 16px; bottom: 16px; }
#cvrt-a11y.cvrt-a11y--bottom-left { left: 16px; bottom: 16px; }
#cvrt-a11y.cvrt-a11y--top-right { right: 16px; top: 16px; }
#cvrt-a11y.cvrt-a11y--top-left { left: 16px; top: 16px; }

#cvrt-a11y,
#cvrt-a11y *,
#cvrt-a11y *::before,
#cvrt-a11y *::after {
	box-sizing: border-box;
}

#cvrt-a11y .cvrt-a11y__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

#cvrt-a11y button.cvrt-a11y__launcher {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--cvrt-a11y-color);
	color: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	cursor: pointer;
}

#cvrt-a11y button:focus-visible,
#cvrt-a11y a:focus-visible {
	outline: 3px solid #111;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #fff;
}

#cvrt-a11y .cvrt-a11y__panel {
	position: absolute;
	width: min(360px, calc(100vw - 32px));
	max-height: min(640px, calc(100vh - 100px));
	overflow-y: auto;
	padding: 16px;
	border-radius: 12px;
	background: #fff;
	color: #111;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#cvrt-a11y .cvrt-a11y__panel[hidden] { display: none; }

#cvrt-a11y.cvrt-a11y--bottom-right .cvrt-a11y__panel { right: 0; bottom: 64px; }
#cvrt-a11y.cvrt-a11y--bottom-left .cvrt-a11y__panel { left: 0; bottom: 64px; }
#cvrt-a11y.cvrt-a11y--top-right .cvrt-a11y__panel { right: 0; top: 64px; }
#cvrt-a11y.cvrt-a11y--top-left .cvrt-a11y__panel { left: 0; top: 64px; }

/* The consent banner sits at the bottom; a bottom launcher would cover its
   buttons on a phone (measured on lepetitvert.de at 390px: "Alle akzeptieren").
   While the banner is up, the launcher moves to the top and opens downwards. */
html:has(#cvrt-consent:not([hidden])) #cvrt-a11y.cvrt-a11y--bottom-right,
html:has(#cvrt-consent:not([hidden])) #cvrt-a11y.cvrt-a11y--bottom-left {
	top: 16px;
	bottom: auto;
}

html:has(#cvrt-consent:not([hidden])) #cvrt-a11y.cvrt-a11y--bottom-right .cvrt-a11y__panel,
html:has(#cvrt-consent:not([hidden])) #cvrt-a11y.cvrt-a11y--bottom-left .cvrt-a11y__panel {
	top: 64px;
	bottom: auto;
}

#cvrt-a11y .cvrt-a11y__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 12px;
}

#cvrt-a11y p.cvrt-a11y__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #111;
}

#cvrt-a11y button.cvrt-a11y__close {
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 1px solid #ccc;
	border-radius: 8px;
	background: #fff;
	color: #111;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

#cvrt-a11y .cvrt-a11y__tools {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

#cvrt-a11y button.cvrt-a11y__tool,
#cvrt-a11y a.cvrt-a11y__tool {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	min-height: 56px;
	margin: 0;
	padding: 8px 10px;
	border: 2px solid #d4d4d4;
	border-radius: 8px;
	background: #f5f5f5;
	color: #111;
	font: inherit;
	font-size: 14px;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	/* Themes animate buttons; a pressed state must show at once. */
	transition: none;
	cursor: pointer;
}

#cvrt-a11y button.cvrt-a11y__tool[aria-pressed="true"],
#cvrt-a11y button.cvrt-a11y__tool[aria-expanded="true"] {
	border-color: var(--cvrt-a11y-color);
	background: var(--cvrt-a11y-color);
	color: #fff;
}

#cvrt-a11y .cvrt-a11y__level {
	font-size: 12px;
	font-weight: 700;
}

#cvrt-a11y .cvrt-a11y__structure {
	margin: 12px 0 0;
	padding: 8px 0 0;
	border-top: 1px solid #ddd;
}

#cvrt-a11y .cvrt-a11y__structure[hidden] { display: none; }

#cvrt-a11y p.cvrt-a11y__structure-title {
	margin: 8px 0 4px;
	font-size: 14px;
	font-weight: 700;
	color: #111;
}

#cvrt-a11y .cvrt-a11y__structure ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#cvrt-a11y button.cvrt-a11y__jump {
	display: block;
	width: 100%;
	margin: 0;
	padding: 6px 8px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #111;
	font: inherit;
	font-size: 14px;
	text-align: left;
	text-transform: none;
	white-space: normal;
	overflow-wrap: anywhere;
	cursor: pointer;
}

#cvrt-a11y button.cvrt-a11y__jump:hover { background: #eee; }
#cvrt-a11y button.cvrt-a11y__jump--2 { padding-left: 20px; }
#cvrt-a11y button.cvrt-a11y__jump--3 { padding-left: 32px; }
#cvrt-a11y button.cvrt-a11y__jump--4,
#cvrt-a11y button.cvrt-a11y__jump--5,
#cvrt-a11y button.cvrt-a11y__jump--6 { padding-left: 44px; }

#cvrt-a11y .cvrt-a11y__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 12px 0 0;
}

#cvrt-a11y button.cvrt-a11y__reset {
	margin: 0;
	padding: 8px 12px;
	border: 2px solid #111;
	border-radius: 8px;
	background: #fff;
	color: #111;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

#cvrt-a11y a.cvrt-a11y__statement {
	color: #111;
	font-size: 14px;
	text-decoration: underline;
}

@media (prefers-reduced-motion: no-preference) {
	#cvrt-a11y button.cvrt-a11y__launcher { transition: transform 0.15s; }
	#cvrt-a11y button.cvrt-a11y__launcher:hover { transform: scale(1.06); }
}

/* -- overlays drawn by the script ----------------------------------------- */

.cvrt-a11y-filter {
	position: fixed;
	inset: 0;
	z-index: 2147483646;
	pointer-events: none;
}

.cvrt-a11y-mask {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 2147483645;
	background: rgba(0, 0, 0, 0.6);
	pointer-events: none;
}

.cvrt-a11y-mask--top { top: 0; }
.cvrt-a11y-mask--bottom { bottom: 0; }
.cvrt-a11y-filter[hidden],
.cvrt-a11y-mask[hidden] { display: none; }

/* -- tools acting on the page (never on the tool) ------------------------- */

html.cvrt-a11y-bigger-line-height body *:not(#cvrt-a11y, #cvrt-a11y *) {
	line-height: var(--cvrt-a11y-line-height) !important;
}

html.cvrt-a11y-text-align-1 body *:not(#cvrt-a11y, #cvrt-a11y *) { text-align: left !important; }
html.cvrt-a11y-text-align-2 body *:not(#cvrt-a11y, #cvrt-a11y *) { text-align: center !important; }
html.cvrt-a11y-text-align-3 body *:not(#cvrt-a11y, #cvrt-a11y *) { text-align: right !important; }

/* Icon fonts keep their face, or every icon turns into a letter. */
html.cvrt-a11y-readable-font body *:not(#cvrt-a11y, #cvrt-a11y *, i, [class*="icon"], [class*="fa-"], [class^="fa"], .dashicons) {
	font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
	letter-spacing: 0.02em !important;
	word-spacing: 0.08em !important;
}

html.cvrt-a11y-highlight-links body a:not(#cvrt-a11y a) {
	outline: 3px solid var(--cvrt-a11y-color, #1d4ed8) !important;
	outline-offset: 2px !important;
	text-decoration: underline !important;
}

html.cvrt-a11y-focus-outline body :focus:not(#cvrt-a11y *) {
	outline: 4px solid #111 !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 7px #ffeb3b !important;
}

html.cvrt-a11y-hide-images body :is(img, picture, video, svg, canvas, [role="img"]):not(#cvrt-a11y *) {
	visibility: hidden !important;
}

html.cvrt-a11y-hide-images body *:not(#cvrt-a11y, #cvrt-a11y *) {
	background-image: none !important;
}

html.cvrt-a11y-pause-animations *:not(#cvrt-a11y *),
html.cvrt-a11y-pause-animations *:not(#cvrt-a11y *)::before,
html.cvrt-a11y-pause-animations *:not(#cvrt-a11y *)::after {
	animation-play-state: paused !important;
	transition: none !important;
	scroll-behavior: auto !important;
}
