/* Site Consent Banner. Colours come from --csb-* variables; the accent is set per site. */
.csb-root {
	--csb-bg: #ffffff;
	--csb-fg: #1d2423;
	--csb-muted: #555f5d;
	--csb-line: #dfe4e2;
	--csb-btn2: #eef1f0;
	--csb-shadow: 0 8px 30px rgba(0, 0, 0, .18);
	--csb-link: var(--csb-accent);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.55;
	color: var(--csb-fg);
}
.csb-root.csb-theme-dark {
	--csb-bg: #1f2625;
	--csb-fg: #eef2f1;
	--csb-muted: #aab5b2;
	--csb-line: #36423f;
	--csb-btn2: #2d3634;
	--csb-shadow: 0 8px 30px rgba(0, 0, 0, .5);
	--csb-link: var(--csb-fg);
}
@media (prefers-color-scheme: dark) {
	.csb-root.csb-theme-auto {
		--csb-bg: #1f2625;
		--csb-fg: #eef2f1;
		--csb-muted: #aab5b2;
		--csb-line: #36423f;
		--csb-btn2: #2d3634;
		--csb-shadow: 0 8px 30px rgba(0, 0, 0, .5);
		--csb-link: var(--csb-fg);
	}
}

/* Reset theme styles that leak into the banner. */
.csb-root *, .csb-root *::before, .csb-root *::after { box-sizing: border-box; }
.csb-root h2, .csb-root p { margin: 0; padding: 0; border: 0; text-transform: none; letter-spacing: normal; }
.csb-root button {
	font: inherit; font-size: 14px; line-height: 1.2; text-transform: none; letter-spacing: normal;
	margin: 0; box-shadow: none; min-height: 0; min-width: 0; width: auto; height: auto; text-decoration: none;
}

.csb-banner, .csb-modal {
	position: fixed; z-index: 2147483000; background: var(--csb-bg); color: var(--csb-fg);
	box-shadow: var(--csb-shadow); display: grid; gap: 12px;
}
.csb-title { font-family: inherit; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--csb-fg); }
.csb-body { font-size: 14px; color: var(--csb-muted); }
.csb-who { font-size: 12px; color: var(--csb-muted); }
.csb-text { display: grid; gap: 6px; min-width: 0; }
.csb-root a.csb-link { color: var(--csb-link); text-decoration: underline; }

.csb-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.csb-root .csb-btn {
	flex: 1 1 auto; white-space: nowrap; cursor: pointer; font-weight: 600;
	padding: 10px 16px; border-radius: 8px; border: 1px solid transparent;
}
.csb-root .csb-primary { background: var(--csb-accent); color: var(--csb-on-accent); }
.csb-root .csb-secondary { background: var(--csb-btn2); color: var(--csb-fg); }
.csb-root .csb-ghost { background: transparent; color: var(--csb-fg); border-color: var(--csb-line); }
.csb-root .csb-btn:hover { filter: brightness(.95); }
.csb-root button:focus-visible, .csb-root a:focus-visible, .csb-root input:focus-visible + .csb-slider {
	outline: 2px solid var(--csb-accent); outline-offset: 2px;
}

/* Button style: pills (Accept · Decline, Show details underneath) */
.csb-btns.csb-btns-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.csb-root .csb-btns-pills .csb-primary, .csb-root .csb-btns-pills .csb-outline {
	border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; font-size: 13px; padding: 11px 18px;
}
.csb-root .csb-outline { background: transparent; color: var(--csb-fg); border: 1.5px solid var(--csb-fg); }
.csb-root .csb-details {
	grid-column: 1 / -1; justify-self: center; display: inline-flex; align-items: center; gap: 6px;
	background: transparent; border: 0; padding: 4px 8px; color: var(--csb-fg); cursor: pointer;
	font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
.csb-root .csb-details:hover span { text-decoration: underline; }

/* Button style: row (Individual settings · Deny · Accept all) */
.csb-btns.csb-btns-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.csb-root .csb-btns-row .csb-btn { border-radius: 6px; white-space: normal; padding: 10px 12px; }
.csb-banner.csb-bar .csb-btns-row { grid-template-columns: repeat(3, auto); }
.csb-banner.csb-bar .csb-btns-pills { grid-template-columns: repeat(2, minmax(130px, auto)); }

/* Layouts */
.csb-banner.csb-box {
	left: max(20px, env(safe-area-inset-left, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px));
	width: 400px; max-width: calc(100vw - 40px); padding: 20px; border-radius: 12px; border: 1px solid var(--csb-line);
}
.csb-banner.csb-box.csb-right { left: auto; right: max(20px, env(safe-area-inset-right, 0px)); }
.csb-banner.csb-bar {
	left: 0; right: 0; bottom: 0; border-top: 1px solid var(--csb-line);
	padding: 18px max(24px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
	grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 28px;
}
.csb-banner.csb-bar .csb-btns { flex-wrap: nowrap; }
.csb-banner.csb-center {
	left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 480px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto;
	padding: 24px; border-radius: 14px;
}
.csb-backdrop { position: fixed; inset: 0; z-index: 2147482999; background: rgba(15, 20, 19, .45); }

@media (max-width: 720px) {
	.csb-banner.csb-bar { grid-template-columns: minmax(0, 1fr); }
	.csb-banner.csb-bar .csb-btns { flex-wrap: wrap; }
	.csb-banner.csb-box, .csb-banner.csb-box.csb-right { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; }
}

/* Settings dialog */
.csb-modal {
	left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 540px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow: auto;
	padding: 22px; border-radius: 14px; gap: 14px;
}
.csb-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.csb-root .csb-close {
	flex: none; background: transparent; border: 0; color: var(--csb-fg); font-size: 26px; line-height: 1;
	padding: 2px 8px; cursor: pointer; border-radius: 6px;
}
.csb-cat { border: 1px solid var(--csb-line); border-radius: 10px; padding: 14px; display: grid; gap: 6px; }
.csb-cat-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; }
.csb-cat-row label { cursor: pointer; }
.csb-cat-desc { font-size: 13.5px; color: var(--csb-muted); }
.csb-always { font-size: 12.5px; font-weight: 600; color: var(--csb-link); white-space: nowrap; }

.csb-switch { position: relative; width: 44px; height: 24px; flex: none; }
.csb-switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.csb-slider { position: absolute; inset: 0; border-radius: 999px; background: var(--csb-line); transition: background .15s; }
.csb-slider::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
	background: #ffffff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.csb-switch input:checked + .csb-slider { background: var(--csb-accent); }
.csb-switch input:checked + .csb-slider::after { transform: translateX(20px); }

/* Reopen button */
.csb-root .csb-float {
	position: fixed; z-index: 2147482990;
	left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
	width: 44px; height: 44px; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer;
	background: var(--csb-bg); color: var(--csb-accent); border: 1px solid var(--csb-line); box-shadow: var(--csb-shadow);
}
.csb-root.csb-pos-right .csb-float { left: auto; right: max(16px, env(safe-area-inset-right, 0px)); }
.csb-root.csb-theme-dark .csb-float { color: var(--csb-fg); }
.csb-root .csb-float[hidden] { display: none; }

/* Policy section from [csb_cookie_policy] */
.csb-policy table { border-collapse: collapse; width: 100%; }
.csb-policy th, .csb-policy td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid rgba(127, 127, 127, .3); }

@media (prefers-reduced-motion: reduce) {
	.csb-slider, .csb-slider::after { transition: none; }
}
