/* Cookie consent banner. Theme-independent, deliberately low-specificity-proof
   (own prefix + high z-index) so it survives every project fork's CSS. */

.cc-banner,
.cc-modal {
	--cc-accent: #1a73e8;
	--cc-accent-fg: #ffffff;
	--cc-link: #1a73e8;
	--cc-bg: #ffffff;
	--cc-fg: #1f2328;
	--cc-muted: #5b6470;
	--cc-border: #e3e6ea;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	color: var(--cc-fg);
}

.cc-banner *,
.cc-modal * {
	box-sizing: border-box;
}

.cc-banner {
	position: fixed;
	z-index: 2147483000;
	left: 0;
	right: 0;
	bottom: 0;
	display: none;
	gap: 20px;
	align-items: center;
	padding: 18px 24px;
	background: var(--cc-bg);
	border-top: 1px solid var(--cc-border);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, .12);
}

.cc-banner--open {
	display: flex;
}

.cc-banner--center.cc-banner--open {
	top: 50%;
	bottom: auto;
	left: 50%;
	right: auto;
	transform: translate(-50%, -50%);
	max-width: 560px;
	width: calc(100% - 32px);
	flex-direction: column;
	align-items: stretch;
	border: 1px solid var(--cc-border);
	border-radius: 10px;
}

.cc-banner__body {
	flex: 1 1 auto;
	min-width: 0;
}

.cc-banner__title {
	font-weight: 700;
	margin-bottom: 4px;
}

.cc-banner__text,
.cc-modal__text {
	color: var(--cc-muted);
}

.cc-banner__actions,
.cc-modal__actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
}

.cc-btn {
	appearance: none;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	white-space: nowrap;
	padding: 10px 18px;
	border-radius: 6px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--cc-fg);
	transition: opacity .15s ease;
}

.cc-btn:hover {
	opacity: .85;
}

.cc-btn--primary {
	background: var(--cc-accent);
	border-color: var(--cc-accent);
	color: var(--cc-accent-fg);
}

.cc-btn--ghost {
	border-color: var(--cc-border);
}

.cc-btn--link {
	padding-left: 8px;
	padding-right: 8px;
	color: var(--cc-muted);
	text-decoration: underline;
}

.cc-link {
	color: var(--cc-link);
	text-decoration: underline;
}

.cc-modal {
	position: fixed;
	z-index: 2147483001;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 18, 22, .55);
}

.cc-modal--open {
	display: flex;
}

.cc-modal__box {
	width: 100%;
	max-width: 620px;
	max-height: 88vh;
	overflow: auto;
	padding: 24px;
	border-radius: 10px;
	background: var(--cc-bg);
}

.cc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.cc-modal__title {
	font-size: 18px;
	font-weight: 700;
}

.cc-modal__close {
	appearance: none;
	border: 0;
	background: none;
	cursor: pointer;
	font-size: 26px;
	line-height: 1;
	color: var(--cc-muted);
}

.cc-cats {
	margin: 18px 0;
	border-top: 1px solid var(--cc-border);
}

.cc-cat {
	padding: 14px 0;
	border-bottom: 1px solid var(--cc-border);
}

.cc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: pointer;
	margin: 0;
	font-weight: 600;
}

.cc-cat__desc {
	margin-top: 4px;
	color: var(--cc-muted);
	font-size: 13px;
}

.cc-cat__always {
	font-size: 12px;
	font-weight: 600;
	color: var(--cc-link);
	text-transform: uppercase;
	letter-spacing: .03em;
}

.cc-switch {
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 24px;
}

.cc-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
	z-index: 1;
}

.cc-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #c9ced6;
	transition: background .15s ease;
}

.cc-switch__track::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease;
}

.cc-switch input:checked ~ .cc-switch__track {
	background: var(--cc-accent);
}

.cc-switch input:checked ~ .cc-switch__track::after {
	transform: translateX(20px);
}

.cc-switch input:focus-visible ~ .cc-switch__track,
.cc-btn:focus-visible {
	outline: 2px solid var(--cc-accent);
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.cc-banner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 16px;
		max-height: 80vh;
		overflow: auto;
	}

	.cc-banner__actions {
		justify-content: stretch;
	}

	.cc-banner__actions .cc-btn {
		flex: 1 1 auto;
	}
}
