/* Trachthaus Cookie Consent */
#thc-root[hidden], #thc-widget[hidden], #thc-root [hidden] { display: none !important; }

#thc-root {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: var(--thc-font);
	color: var(--thc-text);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
#thc-root *, #thc-root *::before, #thc-root *::after { box-sizing: border-box; }

#thc-root .thc-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .6);
}

#thc-root .thc-dialog {
	position: relative;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--thc-bg);
	border-radius: var(--thc-radius);
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .35);
	padding: 40px 44px 28px;
	outline: none;
}

/* Leiste unten */
#thc-root.thc-layout-bar { align-items: flex-end; padding: 0; }
#thc-root.thc-layout-bar .thc-backdrop { background: rgba(0, 0, 0, .35); }
#thc-root.thc-layout-bar .thc-dialog {
	max-width: none;
	max-height: 85vh;
	border-radius: var(--thc-radius) var(--thc-radius) 0 0;
	padding: 28px max(24px, calc((100vw - 1140px) / 2)) 20px;
}
#thc-root.thc-layout-bar .thc-buttons { grid-template-columns: repeat(4, 1fr); }
#thc-root.thc-layout-bar [data-thc-view="details"] .thc-buttons { grid-template-columns: repeat(3, 1fr); }

#thc-root .thc-close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--thc-primary);
	cursor: pointer;
	border-radius: var(--thc-radius);
}
#thc-root .thc-close:hover { color: var(--thc-primary-hover); }

#thc-root .thc-title {
	margin: 0 0 24px;
	padding: 0 32px 22px;
	font-family: inherit;
	font-size: clamp(24px, 3.2vw, 34px);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.01em;
	text-align: center;
	color: var(--thc-text);
	border-bottom: 1px solid var(--thc-primary);
	outline: none;
	text-transform: none;
}

#thc-root .thc-text,
#thc-root .thc-text p {
	margin: 0 0 14px;
	font-size: 16px;
	color: var(--thc-text);
}
#thc-root a {
	color: var(--thc-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}
#thc-root a:hover { color: var(--thc-primary-hover); }

/* Checkbox-Reihe */
#thc-root .thc-cats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 32px;
	margin: 22px 0 20px;
}
#thc-root .thc-check {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	cursor: pointer;
	font-size: 18px;
	font-weight: 600;
	user-select: none;
}
#thc-root .thc-check input,
#thc-root .thc-switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}
#thc-root .thc-box {
	width: 26px;
	height: 26px;
	flex: 0 0 26px;
	border: 2px solid var(--thc-primary);
	border-radius: calc(var(--thc-radius) + 1px);
	background: #fff;
	position: relative;
	transition: background-color .15s;
}
#thc-root .thc-check input:checked + .thc-box { background: var(--thc-primary); }
#thc-root .thc-check input:checked + .thc-box::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 2px;
	width: 7px;
	height: 13px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg);
}
#thc-root .thc-check input:disabled + .thc-box { background: #e5e5e5; border-color: #e5e5e5; }
#thc-root .thc-check input:disabled + .thc-box::after { border-color: #8a8a8a; }
#thc-root .thc-check input:disabled ~ .thc-check-label { cursor: default; }
#thc-root .thc-check input:focus-visible + .thc-box,
#thc-root .thc-switch input:focus-visible + .thc-slider {
	outline: 2px solid var(--thc-primary);
	outline-offset: 3px;
}

/* Buttons */
#thc-root .thc-buttons {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin: 8px 0 0;
}
#thc-root .thc-btn,
.thc-blocked .thc-btn {
	display: block;
	width: 100%;
	min-height: 56px;
	padding: 12px 20px;
	border: 2px solid var(--thc-primary);
	border-radius: var(--thc-radius);
	background: var(--thc-primary);
	color: #fff;
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background-color .15s, border-color .15s;
	text-transform: none;
	letter-spacing: 0;
}
#thc-root .thc-btn:hover,
.thc-blocked .thc-btn:hover {
	background: var(--thc-primary-hover);
	border-color: var(--thc-primary-hover);
	color: #fff;
}
#thc-root .thc-btn:focus-visible,
.thc-blocked .thc-btn:focus-visible,
#thc-root .thc-close:focus-visible,
#thc-root .thc-back:focus-visible {
	outline: 2px solid var(--thc-primary);
	outline-offset: 3px;
}
#thc-root .thc-btn-ghost {
	background: transparent;
	color: var(--thc-primary);
}

/* Footer-Links */
#thc-root .thc-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	gap: 8px 24px;
	margin-top: 32px;
}
#thc-root .thc-links a {
	font-size: 16px;
	text-decoration: none;
}
#thc-root .thc-links a:hover { text-decoration: underline; }

/* Detailansicht */
#thc-root .thc-back {
	border: 0;
	background: none;
	padding: 4px 0;
	margin: 0 0 12px;
	color: var(--thc-primary);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
#thc-root .thc-group {
	border-top: 1px solid #dee2e6;
	padding: 18px 0 8px;
}
#thc-root .thc-group-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
#thc-root .thc-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	cursor: pointer;
}
#thc-root .thc-slider {
	position: relative;
	width: 46px;
	height: 26px;
	flex: 0 0 46px;
	border-radius: 13px;
	background: #bdbdbd;
	transition: background-color .15s;
}
#thc-root .thc-slider::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s;
}
#thc-root .thc-switch input:checked + .thc-slider { background: var(--thc-primary); }
#thc-root .thc-switch input:checked + .thc-slider::after { transform: translateX(20px); }
#thc-root .thc-switch input:disabled + .thc-slider { opacity: .55; }
#thc-root .thc-group-title { font-size: 18px; font-weight: 600; }
#thc-root .thc-count { font-size: 14px; color: #747474; white-space: nowrap; }
#thc-root .thc-group-desc { margin: 8px 0 10px; font-size: 15px; color: #555; }
#thc-root .thc-service {
	margin: 0 0 8px;
	border: 1px solid #dee2e6;
	border-radius: var(--thc-radius);
	background: #fafafa;
}
#thc-root .thc-service summary {
	padding: 10px 14px;
	font-weight: 600;
	cursor: pointer;
	list-style-position: inside;
}
#thc-root .thc-service dl {
	display: grid;
	grid-template-columns: minmax(120px, 30%) 1fr;
	gap: 6px 16px;
	margin: 0;
	padding: 4px 14px 14px;
	font-size: 14px;
}
#thc-root .thc-service dt { font-weight: 600; margin: 0; }
#thc-root .thc-service dd { margin: 0; overflow-wrap: anywhere; }
#thc-root [data-thc-view="details"] .thc-buttons { margin-top: 20px; }
#thc-root .thc-meta { margin: 14px 0 0; font-size: 13px; color: #747474; }
#thc-root .thc-meta code { font-size: 12px; background: none; padding: 0; color: inherit; }

/* Widget */
#thc-widget {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147482000;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--thc-primary);
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
	cursor: pointer;
	opacity: .85;
	transition: opacity .15s, background-color .15s;
}
#thc-widget:hover, #thc-widget:focus-visible { opacity: 1; background: var(--thc-primary-hover); }

html.thc-open, html.thc-open body { overflow: hidden; }

/* Platzhalter fuer blockierte Iframes */
.thc-blocked { position: relative; }
.thc-blocked:not(.thc-unblocked) iframe { display: none; }
.thc-placeholder {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	min-height: 240px;
	padding: 24px;
	background: #f4f1f2;
	border: 1px solid #e3dade;
	border-radius: var(--thc-radius);
	color: var(--thc-text);
	font-family: var(--thc-font);
	text-align: center;
}
.thc-placeholder p { margin: 0; font-size: 15px; }
.thc-placeholder a { color: var(--thc-primary); }
.thc-placeholder-title { font-size: 18px !important; font-weight: 600; }
.thc-placeholder-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 10px;
}
.thc-placeholder-actions .thc-btn { width: auto !important; min-height: 44px !important; font-size: 15px !important; }

@media (max-width: 640px) {
	#thc-root { padding: 8px; }
	#thc-root .thc-dialog { padding: 28px 20px 20px; max-height: calc(100dvh - 16px); }
	#thc-root .thc-title { padding: 0 30px 14px; margin-bottom: 16px; font-size: 20px; -webkit-hyphens: auto; hyphens: auto; }
	#thc-root .thc-text, #thc-root .thc-text p { font-size: 14px; }
	#thc-root .thc-cats { justify-content: flex-start; gap: 12px 20px; }
	#thc-root .thc-check { font-size: 16px; }
	#thc-root .thc-btn { min-height: 48px; font-size: 16px; }
	#thc-root.thc-layout-bar .thc-buttons { grid-template-columns: 1fr; }
	#thc-root .thc-links { margin-top: 20px; justify-content: space-between; }
	#thc-root .thc-links a { font-size: 14px; }
	#thc-root .thc-service dl { grid-template-columns: 1fr; gap: 2px; }
	#thc-root .thc-service dd { margin-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	#thc-root *, #thc-widget { transition: none !important; }
}
