/**
 * Cookie consent modal — design system (--ds-*).
 */

.kernel-cookies {
	box-sizing: border-box;
	font-family: var(--ds-font, system-ui, sans-serif);
	inset: 0;
	pointer-events: none;
	position: fixed;
	z-index: 100050;
}

.kernel-cookies.is-open {
	pointer-events: auto;
}

.kernel-cookies *,
.kernel-cookies *::before,
.kernel-cookies *::after {
	box-sizing: border-box;
}

.kernel-cookies__backdrop {
	background: rgba(4, 16, 70, 0.35);
	backdrop-filter: blur(4px);
	inset: 0;
	position: absolute;
	-webkit-backdrop-filter: blur(4px);
}

html[data-theme='dark'] .kernel-cookies__backdrop {
	background: rgba(0, 0, 0, 0.55);
}

.kernel-cookies__dialog {
	background: var(--ds-surface, #fff);
	border: 1px solid var(--ds-border, #e0e4ee);
	border-radius: var(--ds-radius, 10px);
	box-shadow: var(--ds-shadow-dialog, 0 12px 40px rgba(4, 16, 70, 0.18));
	color: var(--ds-text, #1a1d26);
	left: 50%;
	max-height: calc(100vh - 48px);
	max-width: min(560px, calc(100vw - 32px));
	overflow: auto;
	pointer-events: auto;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
}

.kernel-cookies__body.kernel-entity-modal__body {
	padding: 18px 20px 8px;
}

.kernel-cookies__footer.kernel-entity-modal__footer {
	display: flex;
	justify-content: flex-end;
	padding: 12px 20px 18px;
}

.kernel-cookies .kernel-entity-modal__title {
	color: var(--ds-text, #1a1d26);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 12px;
}

.kernel-cookies__body {
	padding-bottom: 8px;
}

.kernel-cookies__lead {
	color: var(--ds-text, #1a1d26);
	font-size: 0.9375rem;
	line-height: 1.55;
	margin: 0 0 16px;
}

.kernel-cookies__docs-label {
	color: var(--ds-muted, #5c6578);
	font-size: 0.8125rem;
	font-weight: 600;
	margin: 0 0 8px;
}

.kernel-cookies__legal {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kernel-cookies__legal li {
	margin: 0 0 6px;
}

.kernel-cookies__legal li:last-child {
	margin-bottom: 0;
}

.kernel-cookies__legal a {
	color: var(--ds-accent, #041046);
	font-size: 0.875rem;
	line-height: 1.45;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.kernel-cookies__legal a:hover,
.kernel-cookies__legal a:focus-visible {
	color: var(--ds-accent, #041046);
	opacity: 0.85;
}

.kernel-cookies__footer {
	flex-wrap: wrap;
	gap: 10px;
}

.kernel-cookies__footer .kernel-entity-btn {
	min-width: 10rem;
}

body.kernel-cookies-open {
	overflow: hidden;
}

@media (max-width: 479px) {
	.kernel-cookies__dialog {
		bottom: 0;
		left: 0;
		max-height: none;
		max-width: none;
		top: auto;
		transform: none;
		width: 100%;
	}

	.kernel-cookies__dialog.kernel-entity-modal__dialog {
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
	}

	.kernel-cookies__footer {
		flex-direction: column-reverse;
	}

	.kernel-cookies__footer .kernel-entity-btn {
		width: 100%;
	}
}
