/**
 * Cookie consent banner.
 */

.cookie-consent {
	position: fixed;
	inset: auto 0 0;
	z-index: 80;
	padding: 1rem;
	pointer-events: none;
}

.cookie-consent.hidden {
	display: none;
}

.cookie-consent__panel {
	pointer-events: auto;
	max-width: 1480px;
	margin: 0 auto;
	padding: 1.25rem 1.5rem;
	border: 1px solid #e5e5e5;
	border-radius: 0.75rem;
	background: #fff;
	box-shadow: 0 18px 48px rgba(15, 20, 15, 0.16);
}

.cookie-consent__view.hidden {
	display: none;
}

.cookie-consent__view--simple {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
}

.cookie-consent__content {
	flex: 1 1 18rem;
	min-width: 0;
}

.cookie-consent__title {
	margin: 0 0 0.35rem;
	font-family: IBM Plex Sans, ui-sans-serif, system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 600;
	color: #0f140f;
}

.cookie-consent__text {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.55;
	color: #666;
}

.cookie-consent__link {
	color: #16705c;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cookie-consent__link:hover {
	color: #125c4d;
}

.cookie-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.cookie-consent__actions--simple {
	flex: 0 1 auto;
}

.cookie-consent__actions--details {
	margin-top: 1rem;
	justify-content: flex-end;
}

.cookie-consent__btn {
	min-height: 44px;
	white-space: nowrap;
}

.cookie-consent__details-head {
	margin-bottom: 1rem;
}

.cookie-consent__categories {
	display: grid;
	gap: 0.75rem;
	max-height: min(42vh, 22rem);
	overflow: auto;
	padding-right: 0.25rem;
}

.cookie-consent__category {
	border: 1px solid #e5e5e5;
	border-radius: 0.625rem;
	padding: 1rem;
	background: #fafafa;
}

.cookie-consent__category-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.cookie-consent__category-title {
	margin: 0 0 0.35rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #0f140f;
}

.cookie-consent__category-text {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #666;
}

.cookie-consent__switch {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	cursor: pointer;
	user-select: none;
}

.cookie-consent__switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.cookie-consent__switch-ui {
	position: relative;
	width: 2.75rem;
	height: 1.5rem;
	border-radius: 999px;
	background: #d4d4d4;
	transition: background 0.2s ease;
}

.cookie-consent__switch-ui::after {
	content: '';
	position: absolute;
	top: 0.125rem;
	left: 0.125rem;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s ease;
}

.cookie-consent__switch input:checked + .cookie-consent__switch-ui {
	background: #16705c;
}

.cookie-consent__switch input:checked + .cookie-consent__switch-ui::after {
	transform: translateX(1.25rem);
}

.cookie-consent__switch input:disabled + .cookie-consent__switch-ui {
	opacity: 0.75;
}

.cookie-consent__switch-label {
	font-size: 0.75rem;
	color: #666;
	white-space: nowrap;
}

.cookie-consent__cookie-list {
	margin-top: 0.75rem;
}

.cookie-consent__cookie-list summary {
	cursor: pointer;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #16705c;
}

.cookie-consent__cookie-list ul {
	margin: 0.5rem 0 0;
	padding-left: 1rem;
	list-style: disc;
}

.cookie-consent__cookie-list li {
	margin: 0.35rem 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: #444;
}

.cookie-consent__cookie-list strong {
	color: #0f140f;
}

.cookie-consent__cookie-meta,
.cookie-consent__cookie-purpose {
	display: block;
	color: #666;
}

body.cookie-consent-open {
	padding-bottom: 7rem;
}

body.cookie-consent-open--details {
	padding-bottom: 28rem;
}

@media (max-width: 767px) {
	.cookie-consent {
		padding: 0.75rem;
	}

	.cookie-consent__panel {
		padding: 1rem;
	}

	.cookie-consent__actions--simple,
	.cookie-consent__actions--details {
		width: 100%;
	}

	.cookie-consent__actions .cookie-consent__btn {
		flex: 1 1 100%;
		justify-content: center;
	}

	.cookie-consent__category-head {
		flex-direction: column;
	}

	.cookie-consent__switch {
		align-self: flex-start;
	}

	body.cookie-consent-open--details {
		padding-bottom: 34rem;
	}
}
