.egdpr,
.egdpr-embed {
	--egdpr-bg: #ffffff;
	--egdpr-text: #1f2937;
	--egdpr-muted: #4b5563;
	--egdpr-border: #e5e7eb;
	--egdpr-on-accent: #ffffff;
	font-size: 15px;
	line-height: 1.5;
	color: var(--egdpr-text);
}

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

.egdpr [hidden] {
	display: none !important;
}

.egdpr-banner {
	position: fixed;
	z-index: 999999;
	background: var(--egdpr-bg);
	color: var(--egdpr-text);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
	padding: 20px 24px;
}

.egdpr--bar .egdpr-banner {
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px 32px;
	align-items: center;
}

.egdpr--bar .egdpr-title,
.egdpr--bar .egdpr-text {
	grid-column: 1;
}

.egdpr--bar .egdpr-actions {
	grid-column: 2;
	grid-row: 1 / span 2;
}

.egdpr--box .egdpr-banner {
	left: 16px;
	bottom: 16px;
	width: min(420px, calc(100vw - 32px));
	border-radius: 12px;
}

.egdpr-title,
.egdpr-dialog h2 {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 600;
	color: inherit;
}

.egdpr-text p {
	margin: 0 0 6px;
	color: var(--egdpr-muted);
}

.egdpr-text a,
.egdpr-policy {
	color: var(--egdpr-accent);
	text-decoration: underline;
}

.egdpr-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

/* Accept and reject share one style so neither choice is nudged. */
.egdpr-btn {
	appearance: none;
	border: 2px solid var(--egdpr-accent);
	background: var(--egdpr-accent);
	color: var(--egdpr-on-accent);
	border-radius: 6px;
	padding: 9px 18px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.egdpr-btn--ghost {
	background: transparent;
	color: var(--egdpr-accent);
}

/* Floating "Cookie settings" button */
.egdpr-float {
	position: fixed;
	z-index: 999998;
	bottom: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--egdpr-accent);
	color: var(--egdpr-on-accent);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.15s, transform 0.15s;
}

.egdpr-float--left {
	left: 16px;
}

.egdpr-float--right {
	right: 16px;
}

.egdpr-float:hover,
.egdpr-float:focus-visible {
	opacity: 1;
	transform: scale(1.06);
}

@media print {
	.egdpr-float {
		display: none !important;
	}
}

.egdpr-btn:focus-visible,
.egdpr-float:focus-visible,
.egdpr-close:focus-visible,
.egdpr-switch input:focus-visible + .egdpr-switch-ui {
	outline: 3px solid var(--egdpr-accent);
	outline-offset: 2px;
}

.egdpr-dialog {
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--egdpr-bg);
	color: var(--egdpr-text);
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
}

.egdpr-dialog::backdrop {
	background: rgba(0, 0, 0, 0.45);
}

.egdpr-dialog-inner {
	padding: 24px;
	margin: 0;
}

.egdpr-dialog-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.egdpr-close {
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.egdpr-categories {
	list-style: none;
	margin: 16px 0;
	padding: 0;
}

.egdpr-category {
	padding: 12px 0;
	border-top: 1px solid var(--egdpr-border);
}

.egdpr-category-desc {
	margin: 4px 0 0 56px;
	color: var(--egdpr-muted);
	font-size: 14px;
}

.egdpr-switch {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	font-weight: 600;
}

.egdpr-switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.egdpr-switch-ui {
	position: relative;
	flex: 0 0 44px;
	height: 24px;
	border-radius: 12px;
	background: #9ca3af;
	transition: background 0.15s;
}

.egdpr-switch-ui::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s;
}

.egdpr-switch input:checked + .egdpr-switch-ui {
	background: var(--egdpr-accent);
}

.egdpr-switch input:checked + .egdpr-switch-ui::after {
	transform: translateX(20px);
}

.egdpr-switch input:disabled + .egdpr-switch-ui {
	opacity: 0.6;
	cursor: not-allowed;
}

@media (max-width: 782px) {
	.egdpr--bar .egdpr-banner {
		grid-template-columns: 1fr;
	}

	.egdpr--bar .egdpr-actions {
		grid-column: 1;
		grid-row: auto;
	}

	.egdpr-actions .egdpr-btn {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.egdpr-switch-ui,
	.egdpr-switch-ui::after,
	.egdpr-float {
		transition: none;
	}
}

.egdpr-consent-id {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--egdpr-muted);
}

.egdpr-consent-id code {
	font-size: 12px;
	word-break: break-all;
}

/* Blocked embeds */
.egdpr-embed {
	position: relative;
	display: block;
	max-width: 100%;
	min-height: 220px;
	background: #f3f4f6;
	color: var(--egdpr-text);
	border-radius: 8px;
	overflow: hidden;
}

.egdpr-embed--sized {
	min-height: 0;
}

.egdpr-embed iframe {
	display: none;
}

.egdpr-embed--sized iframe {
	width: 100%;
	height: 100%;
}

.egdpr-embed.is-loaded {
	min-height: 0;
	background: none;
	border-radius: 0;
	overflow: visible;
}

.egdpr-embed.is-loaded iframe {
	display: block;
}

.egdpr-embed.is-loaded .egdpr-embed-notice {
	display: none;
}

.egdpr-embed-notice {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 16px;
	text-align: center;
	font-size: 15px;
	line-height: 1.5;
}

.egdpr-embed-notice p {
	margin: 0;
	max-width: 46ch;
}

.egdpr-embed-notice p + p {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 16px;
	margin-top: 8px;
}

.egdpr-embed-notice a {
	color: var(--egdpr-accent);
	text-decoration: underline;
}

/* Block editor responsive embeds: fill the ratio box the wrapper already reserves. */
.wp-has-aspect-ratio .wp-block-embed__wrapper > .egdpr-embed {
	position: absolute;
	inset: 0;
	width: auto !important;
	min-height: 0;
	aspect-ratio: auto !important;
}

/* Forms */
.egdpr-form-consent input[type="checkbox"] {
	margin-right: 6px;
}

.egdpr-request fieldset {
	border: 0;
	margin: 0 0 12px;
	padding: 0;
}

.egdpr-request fieldset label,
.egdpr-request p > label {
	display: block;
	margin-bottom: 4px;
}

.egdpr-request input[type="email"] {
	width: 100%;
	max-width: 420px;
}

.egdpr-request-notice {
	padding: 12px 16px;
	border-left: 4px solid currentColor;
	background: rgba(0, 0, 0, 0.04);
}

.egdpr-request-notice--success {
	color: #166534;
}

.egdpr-request-notice--error {
	color: #b91c1c;
}

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