/**
 * Revo Coockies – CMP-style banner (CookieYes-like layout, not affiliated).
 * Class name "backdrop" avoids substring "overlay" (some themes force pointer-events:none).
 */

:root {
	--rcoc-accent: #159957;
	--rcoc-accent-contrast: #fff;
	--rcoc-radius: 14px;
	--rcoc-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

body.rcoc-noscroll {
	overflow: hidden;
}

.rcoc-root[hidden] {
	display: none !important;
}

.rcoc-root.rcoc--top .rcoc-backdrop {
	align-items: flex-start;
	padding-top: 1rem;
}

.rcoc-root.rcoc--bottom .rcoc-backdrop {
	align-items: flex-end;
	padding-bottom: 0;
}

.rcoc-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	justify-content: center;
	align-items: flex-end;
	padding: 0;
	box-sizing: border-box;
	background: rgba(15, 23, 42, 0.42);
	pointer-events: auto;
}

.rcoc-layout-box .rcoc-backdrop {
	padding: 1rem;
}

.rcoc-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: min(960px, calc(100vw - 2rem));
	max-height: min(92vh, 100%);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #1e293b;
	border-radius: var(--rcoc-radius);
	box-shadow: var(--rcoc-shadow);
	box-sizing: border-box;
	pointer-events: auto;
}

.rcoc-layout-bar .rcoc-card {
	max-width: none;
	width: 100%;
	border-radius: var(--rcoc-radius) var(--rcoc-radius) 0 0;
	max-height: min(92vh, 100%);
}

.rcoc-card__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	padding: 1.35rem 1.5rem 0.75rem;
}

.rcoc-block--prefs {
	padding-bottom: 0.5rem;
}

.rcoc-card__title {
	margin: 0 0 0.65rem;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.25;
	color: #0f172a;
}

.rcoc-card__title--sm {
	font-size: 1.05rem;
	margin: 0;
}

.rcoc-card__body {
	margin-bottom: 0.85rem;
	max-height: min(52vh, 520px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.rcoc-card__text {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
	color: #475569;
	white-space: pre-line;
}

.rcoc-card__privacy {
	margin: 0 0 1rem;
	font-size: 0.85rem;
}

.rcoc-card__privacy a {
	color: var(--rcoc-accent);
	font-weight: 600;
	text-decoration: none;
}

.rcoc-card__privacy a:hover {
	text-decoration: underline;
}

.rcoc-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.rcoc-actions--bar {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.6rem;
	justify-content: stretch;
	border-top: 1px solid #e2e8f0;
	padding: 1rem 1.5rem 1.15rem;
	background: #f8fafc;
	flex-shrink: 0;
	border-radius: 0 0 var(--rcoc-radius) var(--rcoc-radius);
}

.rcoc-layout-bar .rcoc-actions--bar {
	border-radius: 0;
}

.rcoc-actions--bar > .rcoc-btn {
	flex: 1 1 0;
	min-width: 0;
	text-align: center;
	justify-content: center;
}

.rcoc-btn--middle {
	font-weight: 700;
}

.rcoc-btn {
	cursor: pointer;
	border: none;
	border-radius: 8px;
	padding: 0.55rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	font-family: inherit;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.rcoc-btn:focus-visible {
	outline: 2px solid var(--rcoc-accent);
	outline-offset: 2px;
}

.rcoc-btn--primary {
	background: var(--rcoc-accent);
	color: var(--rcoc-accent-contrast);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.rcoc-btn--primary:hover {
	filter: brightness(1.06);
}

.rcoc-btn--outline {
	background: #fff;
	color: #334155;
	border: 1px solid #cbd5e1;
}

.rcoc-btn--outline:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
}

.rcoc-btn--text {
	background: transparent;
	color: #475569;
	border: 1px solid transparent;
}

.rcoc-btn--text:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.rcoc-prefs-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #e2e8f0;
}

.rcoc-prefs-head .rcoc-card__title--sm {
	flex: 1;
	min-width: 0;
}

.rcoc-prefs-head .rcoc-btn--text {
	padding: 0.35rem 0.6rem;
	min-width: 2.5rem;
}

.rcoc-cat-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.rcoc-cat {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 0.75rem 0.85rem;
	background: #fafafa;
}

.rcoc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.35rem;
}

.rcoc-cat__title {
	font-size: 0.9rem;
	font-weight: 700;
	color: #0f172a;
	flex: 1;
	min-width: 0;
}

.rcoc-cat__desc {
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.45;
	color: #64748b;
}

.rcoc-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
	cursor: pointer;
}

.rcoc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.rcoc-switch-slider {
	position: absolute;
	inset: 0;
	background: #cbd5e1;
	border-radius: 24px;
	transition: background 0.2s ease;
}

.rcoc-switch-slider::before {
	content: '';
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.rcoc-switch input:checked + .rcoc-switch-slider {
	background: var(--rcoc-accent);
}

.rcoc-switch input:checked + .rcoc-switch-slider::before {
	transform: translateX(20px);
}

.rcoc-switch input:focus-visible + .rcoc-switch-slider {
	outline: 2px solid var(--rcoc-accent);
	outline-offset: 2px;
}

.rcoc-switch--locked {
	cursor: default;
	opacity: 0.85;
}

.rcoc-switch--locked .rcoc-switch-slider {
	background: var(--rcoc-accent);
}

@media (max-width: 600px) {
	.rcoc-layout-box .rcoc-backdrop {
		padding: 0;
		align-items: flex-end;
	}

	.rcoc-layout-box .rcoc-card {
		max-width: none;
		width: 100%;
		border-radius: 14px 14px 0 0;
	}

	.rcoc-card__scroll {
		padding: 1.1rem 1rem 0.5rem;
	}

	.rcoc-actions--bar {
		flex-direction: column;
		flex-wrap: wrap;
		padding: 0.85rem 1rem 1rem;
		border-radius: 0;
	}

	.rcoc-actions--bar > .rcoc-btn {
		flex: none;
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rcoc-btn,
	.rcoc-switch-slider,
	.rcoc-switch-slider::before {
		transition: none;
	}
}
