/* Cookie Banner RODO */
.wpcb,
.wpcb-reopen {
	--wpcb-accent: #1d4ed8;
	--wpcb-bg: #ffffff;
	--wpcb-fg: #111827;
	--wpcb-muted: #4b5563;
	--wpcb-border: rgba(17, 24, 39, 0.1);
	--wpcb-soft: #f3f4f6;
	--wpcb-switch-off: #d1d5db;
	--wpcb-shadow: 0 12px 40px rgba(17, 24, 39, 0.16), 0 2px 6px rgba(17, 24, 39, 0.06);
}

.wpcb--dark {
	--wpcb-bg: #111827;
	--wpcb-fg: #f9fafb;
	--wpcb-muted: #cbd5e1;
	--wpcb-border: rgba(255, 255, 255, 0.12);
	--wpcb-soft: #1f2937;
	--wpcb-switch-off: #4b5563;
	--wpcb-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.wpcb {
	position: fixed;
	z-index: 2147483000;
	left: 16px;
	right: 16px;
	bottom: 16px;
	max-width: 960px;
	max-height: calc(100vh - 32px);
	margin: 0 auto;
	overflow-y: auto;
	box-sizing: border-box;
	background: var(--wpcb-bg);
	color: var(--wpcb-fg);
	border: 1px solid var(--wpcb-border);
	border-radius: 14px;
	box-shadow: var(--wpcb-shadow);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	text-align: left;
	animation: wpcb-in 0.28s ease-out;
}

.wpcb[hidden],
.wpcb-reopen[hidden],
.wpcb [hidden] {
	display: none !important;
}

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

.wpcb__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 24px;
	padding: 16px 20px;
}

.wpcb__body {
	flex: 1 1 380px;
	min-width: 0;
}

.wpcb .wpcb__title {
	margin: 0 0 2px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wpcb-fg);
}

.wpcb .wpcb__text {
	margin: 0;
	padding: 0;
	font-size: 13.5px;
	color: var(--wpcb-muted);
}

.wpcb .wpcb__link {
	color: var(--wpcb-fg);
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

.wpcb .wpcb__link:hover {
	color: var(--wpcb-accent);
}

/* Actions */
.wpcb__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.wpcb .wpcb__btn {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 16px;
	border-radius: 8px;
	border: 1px solid transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s, filter 0.15s;
}

.wpcb .wpcb__btn--primary {
	background: var(--wpcb-accent);
	color: #fff;
}

.wpcb .wpcb__btn--primary:hover {
	filter: brightness(1.1);
}

.wpcb .wpcb__btn--ghost {
	background: transparent;
	color: var(--wpcb-fg);
	border-color: var(--wpcb-border);
}

.wpcb .wpcb__btn--ghost:hover {
	background: var(--wpcb-soft);
}

.wpcb .wpcb__btn:focus-visible,
.wpcb .wpcb__switch:focus-visible,
.wpcb .wpcb__link:focus-visible,
.wpcb-reopen:focus-visible {
	outline: 2px solid var(--wpcb-accent);
	outline-offset: 2px;
}

/* Preferences */
.wpcb.is-expanded .wpcb__body,
.wpcb__prefs {
	flex-basis: 100%;
}

.wpcb.is-expanded .wpcb__actions {
	margin-left: auto;
}

.wpcb__prefs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.wpcb .wpcb__cat {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 10px 12px;
	background: var(--wpcb-soft);
	border-radius: 10px;
	cursor: pointer;
}

.wpcb__cat-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.wpcb__cat-name {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--wpcb-fg);
}

.wpcb__cat-desc {
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--wpcb-muted);
}

.wpcb .wpcb__switch {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 36px;
	height: 20px;
	margin: 2px 0 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--wpcb-switch-off);
	cursor: pointer;
	transition: background-color 0.15s;
}

.wpcb .wpcb__switch::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s;
}

.wpcb .wpcb__switch:checked {
	background: var(--wpcb-accent);
}

.wpcb .wpcb__switch:checked::before {
	transform: translateX(16px);
}

.wpcb .wpcb__switch:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* Reopen button */
.wpcb-reopen {
	all: unset;
	position: fixed;
	z-index: 2147482999;
	left: 16px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--wpcb-bg);
	color: var(--wpcb-accent);
	border: 1px solid var(--wpcb-border);
	box-shadow: var(--wpcb-shadow);
	cursor: pointer;
	transition: transform 0.15s;
}

.wpcb-reopen:hover {
	transform: scale(1.06);
}

/* Mobile */
@media (max-width: 640px) {
	.wpcb {
		left: 8px;
		right: 8px;
		bottom: 8px;
		max-height: calc(100vh - 16px);
	}

	.wpcb__inner {
		padding: 14px;
		gap: 12px;
	}

	.wpcb__body {
		flex-basis: 100%;
	}

	.wpcb__actions,
	.wpcb.is-expanded .wpcb__actions {
		width: 100%;
		margin-left: 0;
	}

	.wpcb .wpcb__btn--primary {
		flex: 1 1 0;
	}

	.wpcb .wpcb__btn--ghost {
		flex: 1 1 100%;
		order: 2;
	}

	.wpcb__prefs {
		grid-template-columns: 1fr;
	}
}

@keyframes wpcb-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpcb {
		animation: none;
	}

	.wpcb *,
	.wpcb-reopen {
		transition: none !important;
	}
}

@media print {
	.wpcb,
	.wpcb-reopen {
		display: none !important;
	}
}
