/*
 * Weble Cookies banner. Loaded only inside the banner's shadow root, so page, theme and Elementor rules never apply.
 * All sizes are px on purpose: rem would follow the host page's root font size.
 *
 * THESIS: a consent prompt that reads as part of the host site's own interface, a quiet sheet rather than an ad bar.
 * OWN-WORLD: the site's background, text and primary colour; every other tone is mixed from those three.
 * Accept and Reject are the same solid key; Customize and Save are the soft key. One motion: the sheet rising.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.wbc {
	--font-sys: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font: var(--font-sys);
	--pad: 20px;
	--br: 8px;
	--bpy: 13px;
	--bpx: 18px;
	--bfs: 14px;
	--bw: 600;
	--btt: none;
	--bls: -.005em;
	--mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
	--line: color-mix(in oklab, var(--fg) 11%, var(--bg));
	--line-strong: color-mix(in oklab, var(--fg) 18%, var(--bg));
	--sub: color-mix(in oklab, var(--fg) 72%, var(--bg));
	--layer: color-mix(in oklab, var(--fg) 4%, var(--bg));
	--r-in: max(0px, calc(var(--r) - 6px));
	--ease: cubic-bezier(.2, .8, .2, 1);
	--shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(0 0 0 / .05), 0 16px 40px -12px rgb(0 0 0 / .22);
	font: 400 15px/1.5 var(--font);
	color: var(--fg);
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons ---------- */

.btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--bpy) var(--bpx);
	border: 0;
	border-radius: var(--br);
	font: var(--bw) var(--bfs)/1.2 var(--font);
	letter-spacing: var(--bls);
	text-transform: var(--btt);
	text-align: center;
	cursor: pointer;
	transition: background-color .15s ease, transform .15s var(--ease);
}
.btn--solid { background: var(--accent); color: var(--accent-fg); }
.btn--solid:hover { background: color-mix(in oklab, var(--accent), var(--accent-fg) 14%); }
.btn--soft { background: var(--soft); color: var(--soft-fg); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--soft-fg) 8%, var(--soft)); }
.btn--soft:hover { background: color-mix(in oklab, var(--soft), var(--soft-fg) 7%); }
.btn:active { transform: scale(.98); }

.iconbtn {
	appearance: none;
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--layer);
	color: var(--fg);
	cursor: pointer;
	transition: background-color .15s ease;
}
.iconbtn:hover { background: var(--line); }

/* ---------- banner layer ---------- */

.layer {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	padding: 16px;
	pointer-events: none;
	container-type: inline-size;
}
.is-preview .layer, .is-preview .overlay { position: absolute; }
.layer--box { align-items: flex-end; justify-content: flex-start; }
.layer--box.pos--bottom-right { justify-content: flex-end; }
.layer--bar { align-items: flex-end; justify-content: center; }
.layer--bar.pos--top { align-items: flex-start; }
.layer--modal {
	align-items: center;
	justify-content: center;
	pointer-events: auto;
	background: rgb(9 9 11 / .42);
}

.card {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	gap: 18px;
	width: 100%;
	max-height: 100%;
	padding: var(--pad);
	overflow: auto;
	overscroll-behavior: contain;
	background: var(--bg);
	color: var(--fg);
	border-radius: var(--r);
	box-shadow: var(--shadow);
}
.card--box { max-width: 392px; }
.card--modal { max-width: 480px; padding: calc(var(--pad) + 8px); gap: 22px; }
.card--bar { max-width: 1120px; }

.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.logo { flex: none; display: block; max-width: 96px; max-height: 28px; width: auto; height: auto; object-fit: contain; }
.title { font: 600 16px/1.3 var(--font); letter-spacing: -.012em; color: var(--fg); text-wrap: balance; }
.card--modal .title { font-size: 19px; }
.msg p { font-size: 14px; line-height: 1.55; color: var(--sub); text-wrap: pretty; }
.msg .link { color: var(--fg); font-weight: 500; white-space: nowrap; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { flex: 1 1 0; min-width: max-content; }

@container (min-width: 760px) {
	.card--bar { flex-direction: row; align-items: center; gap: 32px; padding: calc(var(--pad) - 2px) var(--pad) calc(var(--pad) - 2px) calc(var(--pad) + 4px); }
	.card--bar .card__body { flex: 1 1 auto; min-width: 0; }
	.card--bar .card__head { margin-bottom: 2px; }
	.card--bar .msg p { max-width: 72ch; }
	.card--bar .actions { flex: none; flex-wrap: nowrap; }
	.card--bar .actions .btn { flex: none; }
	.layer--bar { padding: 20px; }
	.layer--box { padding: 24px; }
}

/* ---------- preferences sheet ---------- */

.overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgb(9 9 11 / .42);
	container-type: inline-size;
}
.sheet {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 560px;
	max-height: 92%;
	background: var(--bg);
	color: var(--fg);
	border-radius: var(--r) var(--r) 0 0;
	box-shadow: 0 -16px 48px -16px rgb(0 0 0 / .35);
	overflow: hidden;
}
@container (min-width: 640px) {
	.overlay { align-items: center; padding: 24px; }
	.sheet { max-height: min(100%, 760px); border-radius: var(--r); box-shadow: var(--shadow), 0 40px 80px -24px rgb(0 0 0 / .35); }
}

.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: var(--pad) var(--pad) 4px calc(var(--pad) + 4px); }
.sheet__title { font: 600 18px/1.3 var(--font); letter-spacing: -.015em; color: var(--fg); }
.sheet__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 8px calc(var(--pad) + 4px); }
.intro { font-size: 14px; line-height: 1.55; color: var(--sub); max-width: 62ch; }
.intro p + p { margin-top: 8px; }
.note { margin-top: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--fg); background: var(--layer); border-radius: var(--r-in); }

.cats { margin-top: 18px; border-top: 1px solid var(--line); }
.cat { border-bottom: 1px solid var(--line); }
.cat__head { display: flex; align-items: center; gap: 12px; }
.cat__expand {
	appearance: none;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 56px;
	padding: 14px 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.cat__titles { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.cat__title { font: 600 15px/1.3 var(--font); letter-spacing: -.01em; }
.chip { font-size: 12px; line-height: 1; color: var(--sub); font-variant-numeric: tabular-nums; }
.cat__chev { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 4px; color: var(--sub); border-radius: 50%; transition: transform .22s var(--ease), background-color .15s ease; }
.cat__expand:hover .cat__chev { background: var(--layer); color: var(--fg); }
.cat.is-open .cat__chev { transform: rotate(180deg); }
.cat__desc { margin: -6px 0 14px; padding-right: 64px; font-size: 13px; line-height: 1.5; color: var(--sub); }
.always { display: inline-block; margin-right: 2px; font-weight: 600; color: var(--fg); }

.readout { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .24s var(--ease); }
.readout__inner { overflow: hidden; min-height: 0; }
.cat.is-open .readout { grid-template-rows: 1fr; }
.cat.is-open .readout__inner { padding-bottom: 14px; }
.readout__empty { padding: 10px 12px; font-size: 13px; color: var(--sub); background: var(--layer); border-radius: var(--r-in); }
.items { list-style: none; background: var(--layer); border-radius: var(--r-in); }
.item { padding: 10px 12px; }
.item + .item { border-top: 1px solid var(--line); }
.item__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.item__name { font: 500 12.5px/1.4 var(--mono); color: var(--fg); word-break: break-all; }
.item__meta { font-size: 12px; color: var(--sub); }
.item__purpose { margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--sub); }

.switch { position: relative; flex: none; display: inline-block; width: 44px; height: 26px; cursor: pointer; }
.switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch input:disabled { cursor: not-allowed; }
.switch__track {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	padding-left: 8px;
	color: var(--accent-fg);
	border-radius: 999px;
	background: var(--line-strong);
	transition: background-color .2s ease;
}
.switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / .2), 0 2px 6px rgb(0 0 0 / .12);
	transition: transform .22s var(--ease);
}
.switch__track svg { opacity: .9; }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:disabled + .switch__track { opacity: .5; }
.switch input:checked:disabled + .switch__track { opacity: .55; }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }

.sheet__foot {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	padding: 16px calc(var(--pad) + 4px) calc(16px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--line);
	background: var(--bg);
}
.sheet__foot .btn--save { grid-column: 1 / -1; order: 3; }
@container (min-width: 520px) {
	.sheet__foot { grid-template-columns: 1.2fr 1fr 1fr; }
	.sheet__foot .btn--save { grid-column: auto; order: 0; }
}

/* ---------- revisit ---------- */

.revisit {
	appearance: none;
	position: fixed;
	bottom: 16px;
	z-index: 2147482990;
	display: inline-flex;
	align-items: center;
	height: 44px;
	padding: 0 12px;
	border: 0;
	border-radius: 22px;
	background: var(--bg);
	color: var(--fg);
	box-shadow: var(--shadow);
	font: 600 13px/1 var(--font);
	cursor: pointer;
	transition: box-shadow .2s ease;
}
.revisit--bottom-left { left: 16px; }
.revisit--bottom-right { right: 16px; }
.revisit__label { display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .3s var(--ease), opacity .2s ease, margin .3s var(--ease); }
.revisit:hover .revisit__label, .revisit:focus-visible .revisit__label { max-width: 180px; margin-left: 8px; opacity: 1; }

/* ---------- blocked embed placeholder ---------- */

.ph {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	height: 100%;
	min-height: 200px;
	padding: 24px;
	text-align: center;
	background: var(--layer);
	color: var(--fg);
	border-radius: var(--r);
	box-shadow: inset 0 0 0 1px var(--line);
}
.ph__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); color: var(--sub); box-shadow: 0 0 0 1px var(--line); }
.ph__text { max-width: 44ch; font-size: 14px; line-height: 1.5; color: var(--sub); text-wrap: balance; }
.ph__link { font-size: 13px; color: var(--sub); }

/* ---------- motion: one rise, nothing else moves on its own ---------- */

@media (prefers-reduced-motion: no-preference) {
	@keyframes wbc-rise { from { opacity: 0; transform: translateY(12px); } }
	@keyframes wbc-drop { from { opacity: 0; transform: translateY(-12px); } }
	@keyframes wbc-settle { from { opacity: 0; transform: translateY(8px) scale(.985); } }
	@keyframes wbc-fade { from { opacity: 0; } }
	.card { animation: wbc-rise .42s var(--ease) both; }
	.pos--top .card { animation-name: wbc-drop; }
	.card--modal { animation-name: wbc-settle; }
	.layer--modal, .overlay { animation: wbc-fade .2s ease both; }
	.sheet { animation: wbc-rise .38s var(--ease) both; }
	.revisit { animation: wbc-fade .3s ease both; }
	@container (min-width: 640px) { .sheet { animation-name: wbc-settle; } }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0s !important; }
}
.is-preview * { animation: none !important; }
