.dsgvocap {
	--dsgvocap-ok: #1a7f37;
	--dsgvocap-err: #b32d2e;
	--dsgvocap-accent: #2271b1;
	position: relative;
	margin: 0 0 1em;
}

.dsgvocap-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Box: als Ganzes klickbar */
.dsgvocap-box {
	display: flex;
	align-items: center;
	gap: 0.8em;
	box-sizing: border-box;
	max-width: 400px;
	padding: 0.75em 0.9em;
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.025);
	line-height: 1.3;
	cursor: pointer;
	user-select: none;
	transition: border-color 0.15s, background-color 0.15s;
}

.dsgvocap-box:hover {
	border-color: rgba(0, 0, 0, 0.45);
}

.dsgvocap[data-state="working"] .dsgvocap-box {
	cursor: progress;
}

.dsgvocap[data-state="done"] .dsgvocap-box {
	border-color: var(--dsgvocap-ok);
	background: rgba(26, 127, 55, 0.06);
	cursor: default;
}

.dsgvocap[data-state="error"] .dsgvocap-box {
	border-color: var(--dsgvocap-err);
	background: rgba(179, 45, 46, 0.05);
}

/* Checkbox – gegen Theme-Button-Styles abgesichert */
.dsgvocap button.dsgvocap-check {
	all: unset;
	position: relative;
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 26px;
	height: 26px;
	border: 2px solid #6b6b6b;
	border-radius: 4px;
	background: #fff;
	cursor: inherit;
	transition: border-color 0.15s, background-color 0.15s;
}

.dsgvocap-box:hover button.dsgvocap-check {
	border-color: #1e1e1e;
}

.dsgvocap button.dsgvocap-check:focus-visible {
	outline: 2px solid var(--dsgvocap-accent);
	outline-offset: 2px;
}

.dsgvocap[data-state="working"] button.dsgvocap-check {
	border-color: var(--dsgvocap-accent);
	border-right-color: transparent;
	border-radius: 50%;
	animation: dsgvocap-spin 0.8s linear infinite;
}

/* Haken als SVG – exakt mittig, unabhängig von Schrift und Rahmenbreite des Themes. */
.dsgvocap[data-state="done"] button.dsgvocap-check {
	border-color: var(--dsgvocap-ok);
	background: var(--dsgvocap-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.dsgvocap[data-state="error"] button.dsgvocap-check {
	border-color: var(--dsgvocap-err);
}

.dsgvocap[data-state="error"] button.dsgvocap-check::after {
	content: "!";
	position: absolute;
	inset: 0;
	color: var(--dsgvocap-err);
	font: bold 15px/22px sans-serif;
	text-align: center;
}

/* Text */
.dsgvocap-label {
	display: flex;
	flex-direction: column;
	gap: 0.1em;
	min-width: 0;
}

.dsgvocap-title {
	font-size: 0.95em;
	font-weight: 600;
}

.dsgvocap-text {
	font-size: 0.8em;
	opacity: 0.75;
}

.dsgvocap[data-state="done"] .dsgvocap-text {
	color: var(--dsgvocap-ok);
	opacity: 1;
	font-weight: 600;
}

.dsgvocap[data-state="error"] .dsgvocap-text {
	color: var(--dsgvocap-err);
	opacity: 1;
}

.dsgvocap-shield {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-left: auto;
	opacity: 0.35;
}

.dsgvocap[data-state="done"] .dsgvocap-shield {
	color: var(--dsgvocap-ok);
	opacity: 0.8;
}

.dsgvocap-note,
.dsgvocap-noscript {
	margin: 0.45em 0 0;
	font-size: 0.75em;
}

.dsgvocap-note-text {
	margin-right: 0.6em;
	opacity: 0.7;
}

.dsgvocap-links {
	white-space: nowrap;
}

.dsgvocap-links > * + * {
	margin-left: 0.9em;
}

.dsgvocap-note a {
	color: inherit;
	opacity: 0.85;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.dsgvocap button.dsgvocap-info {
	all: unset;
	color: inherit;
	opacity: 0.85;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.dsgvocap-note a:hover,
.dsgvocap button.dsgvocap-info:hover {
	opacity: 1;
}

.dsgvocap button.dsgvocap-info:focus-visible {
	outline: 2px solid var(--dsgvocap-accent);
	outline-offset: 2px;
}

.dsgvocap-noscript {
	color: var(--dsgvocap-err);
}

/* Erklärfenster */
.dsgvocap-dialog {
	box-sizing: border-box;
	width: min(520px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: var(--dsgvocap-dialog-bg, #fff);
	color: var(--dsgvocap-dialog-fg, #1e1e1e);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	font-size: 15px;
	line-height: 1.55;
	text-align: left;
	overflow: auto;
}

.dsgvocap-dialog::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.dsgvocap-dialog-inner {
	position: relative;
	padding: 26px 28px 22px;
}

.dsgvocap .dsgvocap-dialog-title {
	margin: 0 36px 0.7em 0;
	font-size: 1.3em;
	line-height: 1.3;
}

.dsgvocap-dialog p {
	margin: 0 0 1em;
}

.dsgvocap .dsgvocap-steps {
	margin: 0 0 1em;
	padding: 0;
	list-style: none;
	counter-reset: dsgvocap-step;
}

/* Themes setzen Aufzählungszeichen oft direkt auf li – hier ausdrücklich abschalten. */
.dsgvocap .dsgvocap-steps li {
	position: relative;
	margin: 0 0 0.75em;
	padding-left: 2.3em;
	list-style: none !important;
	background: none;
	counter-increment: dsgvocap-step;
}

.dsgvocap .dsgvocap-steps li::marker {
	content: "";
}

.dsgvocap-steps li::before {
	content: counter(dsgvocap-step);
	position: absolute;
	left: 0;
	top: 0.1em;
	width: 1.6em;
	height: 1.6em;
	border-radius: 50%;
	background: var(--dsgvocap-ok);
	color: #fff;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1.6em;
	text-align: center;
}

.dsgvocap-steps strong {
	display: block;
}

.dsgvocap-dialog .dsgvocap-privacy {
	padding: 0.8em 1em;
	border-radius: 6px;
	background: rgba(26, 127, 55, 0.08);
	font-size: 0.92em;
}

.dsgvocap-privacy a {
	color: inherit;
	text-decoration: underline;
}

.dsgvocap button.dsgvocap-x {
	all: unset;
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: #555;
	font-size: 24px;
	line-height: 34px;
	text-align: center;
	cursor: pointer;
}

.dsgvocap button.dsgvocap-x:hover {
	background: rgba(0, 0, 0, 0.07);
}

.dsgvocap button.dsgvocap-x:focus-visible {
	outline: 2px solid var(--dsgvocap-accent);
}

.dsgvocap-dialog .dsgvocap-dialog-actions {
	margin: 1.2em 0 0;
	text-align: right;
}

@media (max-width: 480px) {
	.dsgvocap-dialog {
		font-size: 14px;
	}

	.dsgvocap-dialog-inner {
		padding: 20px 18px 18px;
	}
}

@keyframes dsgvocap-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.dsgvocap[data-state="working"] button.dsgvocap-check {
		animation-duration: 2.4s;
	}
}
