/* Anwert Cookie Banner — declaration + popup helper styles (theme-neutral). */

.anwert-cookie-declaration__group+.anwert-cookie-declaration__group {
	margin-top: 2em;
}

.anwert-cookie-declaration__description,
.anwert-cookie-declaration__empty {
	margin: 0 0 0.75em;
	opacity: 0.85;
}

.anwert-cookie-declaration__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.anwert-cookie-declaration__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375em;
}

.anwert-cookie-declaration__table th,
.anwert-cookie-declaration__table td {
	text-align: left;
	vertical-align: top;
	padding: 0.5em 0.75em;
	border: 1px solid rgba(0, 0, 0, 0.12);
}

.anwert-cookie-declaration__table thead th {
	background: rgba(0, 0, 0, 0.04);
	font-weight: 600;
}

.anwert-cookie-declaration__table code {
	font-size: 0.9em;
	word-break: break-all;
}

@media (max-width: 640px) {
	.anwert-cookie-declaration__table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.anwert-cookie-declaration__table tr {
		display: block;
		margin-bottom: 1em;
		border: 1px solid rgba(0, 0, 0, 0.12);
	}

	.anwert-cookie-declaration__table td {
		display: block;
		border: 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	}

	.anwert-cookie-declaration__table td::before {
		content: attr(data-label);
		display: block;
		font-weight: 600;
		font-size: 0.8em;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		opacity: 0.7;
		margin-bottom: 0.2em;
	}
}

/* Generated popup: category toggles. */
.anwert-consent-categories {
	display: flex;
	flex-direction: column;
	gap: 0.65em;
	margin: 1.25em 0 1.5em;
}

.anwert-consent-category {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: 0.6em;
	align-items: start;
	cursor: pointer;
}

.anwert-consent-category input {
	margin-top: 0.25em;
}

/* Toggle-switch variant. Only popups generated with the switch markup get
   it; popups created before it (and browsers without :has()) keep the
   native checkbox above. */
.anwert-consent-category:has(.anwert-consent-switch) {
	grid-template-columns: 2.75em minmax(0, 1fr);
	align-items: center;
}

.anwert-consent-category:has(.anwert-consent-switch) input {
	appearance: none;
	-webkit-appearance: none;
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.anwert-consent-switch {
	display: block;
	position: relative;
	width: 2.75em;
	height: 1.65em;
	border-radius: 999px;
	background: #d9d9d9;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
	transition: background-color 160ms ease, box-shadow 160ms ease;
}

.anwert-consent-switch::before {
	content: '';
	position: absolute;
	top: 0.15em;
	left: 0.15em;
	width: 1.35em;
	height: 1.35em;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 160ms ease;
}

.anwert-consent-category input:checked+.anwert-consent-switch {
	background: #1d2748;
}

.anwert-consent-category input:checked+.anwert-consent-switch::before {
	transform: translateX(1.1em);
}

.anwert-consent-category input:focus-visible+.anwert-consent-switch {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.anwert-consent-category input:disabled+.anwert-consent-switch {
	cursor: default;
	opacity: 0.75;
}

/* Generated popup (1.1+): all switches in one row, labels only. */
.anwert-consent-categories--row {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0.75em 2em;
}

.anwert-consent-categories--row .anwert-consent-category {
	grid-template-columns: 2.75em auto;
	flex: 0 0 auto;
}

.anwert-consent-category__description {
	grid-column: 2;
	display: block;
	font-size: 0.875em;
	opacity: 0.85;
}

.anwert-consent-actions .elementor-button {
	width: 100%;
}

/* Matches the generated container's own flex_wrap=wrap; equal-basis items
   only wrap when the mobile rule below forces a 100% basis. */
.anwert-consent-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
}

.anwert-consent-actions>.elementor-element {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
}

@media (max-width: 600px) {
	.anwert-consent-actions>.elementor-element {
		flex-basis: 100%;
	}
}

/* "Cookie settings" trigger (shortcode / widget). */
.anwert-cookie-settings {
	cursor: pointer;
}

.anwert-cookie-settings--button {
	display: inline-block;
	padding: 0.55em 1.1em;
	border: 1px solid currentColor;
	border-radius: 4px;
	text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
	.elementor-popup-modal[data-anwert-consent-popup] .dialog-widget-content {
		animation: none !important;
		transition: none !important;
	}
}