/* Compact cookie bar. Kateetti blues; does not block the page or trap focus. */

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

html[lang="en"] .cookie-copy-fi,
html:not([lang="en"]) .cookie-copy-en {
	display: none;
}

.cookie-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cookie-banner[hidden],
.cookie-details[hidden],
.cookie-info-pop[hidden] {
	display: none !important;
	pointer-events: none !important;
}

html.cookie-banner-open .cookie-banner,
html.cookie-banner-open #cookie-banner {
	display: flex !important;
	pointer-events: auto;
	flex-direction: column;
	align-items: stretch;
	gap: 0.5em;
	position: fixed;
	left: auto;
	right: max(1.15em, env(safe-area-inset-right, 0px));
	bottom: max(1.15em, env(safe-area-inset-bottom, 0px));
	z-index: 10050;
	width: min(24rem, calc(100vw - 2.3em));
	min-width: min(20rem, calc(100vw - 2.3em));
	max-width: 24rem;
	margin: 0;
	padding: 0.75em 1em;
	background: #eef7fc;
	border: 1px solid #c5e6f6;
	border-radius: 12px;
	box-shadow: 0 10px 32px rgba(22, 56, 74, 0.16);
	color: #16384a;
	max-height: min(70vh, 22em);
}

html.cookie-banner-open .cookie-banner[hidden],
html.cookie-banner-open #cookie-banner[hidden] {
	display: none !important;
	pointer-events: none !important;
}

.cookie-banner-bar {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	flex-wrap: nowrap;
	gap: 0.45em;
}

.cookie-banner p,
.cookie-banner-bar p {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.4;
	color: #16384a;
}

#cookie-banner-text {
	flex: 0 1 auto;
	min-width: 0;
	max-width: 100%;
}

.cookie-more-link,
#cookie-more {
	display: inline;
	margin-left: 0.65em;
	padding: 0;
	border: 0;
	background: none;
	color: #0a7fb5;
	font: inherit;
	font-weight: 600;
	font-size: 0.92em;
	line-height: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	cursor: pointer;
	width: auto !important;
	min-width: 0 !important;
	box-shadow: none !important;
}

.cookie-more-link:hover,
#cookie-more:hover {
	color: #086890;
}

.cookie-banner-actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.5em;
	flex: 0 0 auto;
	width: 100%;
}

.cookie-banner .button,
#cookie-accept-all,
#cookie-essential-only {
	min-width: 0 !important;
	width: auto !important;
	flex: 1 1 auto;
	display: inline-block !important;
	padding: 0 1.15em !important;
	margin: 0;
	line-height: 2.35em;
	font-size: 0.92em;
	font-weight: 600;
	text-align: center;
}

#cookie-essential-only {
	background-color: #fff !important;
	background-image: none !important;
	color: #16384a !important;
	border: 1px solid #b7d7e8;
	box-shadow: none;
}

#cookie-essential-only:hover {
	background-color: #dff1fa !important;
	color: #16384a !important;
}

#cookie-essential-only:active {
	background-color: #c5e6f6 !important;
	color: #16384a !important;
}

.cookie-banner button:focus-visible {
	outline: 3px solid #1eb8fb;
	outline-offset: 2px;
}

.cookie-details {
	border-top: 1px solid #c5e6f6;
	padding-top: 0.35em;
	max-height: min(46vh, 14em);
	overflow: auto;
}

.cookie-prefs {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.cookie-pref {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 0.75em;
	row-gap: 0.15em;
	margin: 0;
	padding: 0.28em 0;
	background: none;
	border: 0;
	border-radius: 0;
	border-bottom: 1px solid #d5eaf5;
}

.cookie-pref:last-of-type {
	border-bottom: 0;
	padding-bottom: 0;
}

.cookie-pref-copy {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.08em;
}

.cookie-pref-title {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.28em;
	margin: 0;
	font-size: 0.82em;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.3;
	color: #16384a;
}

.cookie-pref-line {
	margin: 0;
	font-size: 0.76em;
	line-height: 1.3;
	color: #3a5b6c;
	white-space: normal;
}

.cookie-always-on {
	margin: 0 0 0 auto;
	flex: 0 0 auto;
	align-self: center;
	font-size: 0.72em;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: #0a7fb5;
	white-space: nowrap;
}

/* Beat Arcana button chrome: min-width 9em, mobile width 100%, gradient. */
.cookie-banner button.cookie-switch,
.cookie-switch {
	-moz-appearance: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	position: relative;
	display: inline-block !important;
	width: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	height: 22px !important;
	min-height: 22px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background-image: none !important;
	background-color: #b7d7e8 !important;
	box-shadow: inset 0 0 0 1px #a6cde2 !important;
	color: transparent !important;
	font-size: 0 !important;
	line-height: 0 !important;
	letter-spacing: 0 !important;
	text-align: left !important;
	cursor: pointer;
	flex: 0 0 40px !important;
	align-self: center;
	margin-left: auto !important;
	transition: background-color 0.16s ease;
}

.cookie-switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(22, 56, 74, 0.22);
	transition: transform 0.16s ease;
}

.cookie-banner button.cookie-switch[aria-checked="true"],
.cookie-switch[aria-checked="true"] {
	background-color: #0a7fb5 !important;
	box-shadow: none !important;
}

.cookie-switch[aria-checked="true"]::after {
	transform: translateX(18px);
}

.cookie-banner button.cookie-switch:hover,
.cookie-banner button.cookie-switch:active,
.cookie-switch:hover,
.cookie-switch:active {
	background-image: none !important;
	color: transparent !important;
}

.cookie-banner button.cookie-switch[aria-checked="false"]:hover,
.cookie-switch[aria-checked="false"]:hover {
	background-color: #a6cde2 !important;
}

.cookie-banner button.cookie-switch[aria-checked="true"]:hover,
.cookie-switch[aria-checked="true"]:hover {
	background-color: #086890 !important;
}

.cookie-banner button.cookie-info-btn,
.cookie-info-btn {
	-moz-appearance: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 1.15em !important;
	min-width: 0 !important;
	max-width: 1.15em !important;
	height: 1.15em !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #dff1fa !important;
	background-image: none !important;
	color: #0a7fb5 !important;
	font: inherit;
	font-size: 0.78em !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	cursor: pointer;
	box-shadow: none !important;
	flex: 0 0 auto;
}

.cookie-banner button.cookie-info-btn:hover,
.cookie-info-btn:hover,
.cookie-info-btn[aria-expanded="true"] {
	background: #c5e6f6 !important;
	background-image: none !important;
	color: #086890 !important;
}

.cookie-info-pop {
	flex: 1 1 100%;
	width: 100%;
	margin: 0.2em 0 0.05em;
	padding: 0.28em 0.45em;
	background: #f7fbfd;
	border: 1px solid #d5eaf5;
	border-radius: 6px;
}

.cookie-info-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.28em;
}

.cookie-info-row {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: baseline;
	gap: 0.45em 0.6em;
}

.cookie-name {
	font-family: Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.76em;
	font-weight: 700;
	color: #16384a;
	background: #eef7fc;
	border: 1px solid #d5eaf5;
	border-radius: 4px;
	padding: 0.06em 0.35em;
	overflow-wrap: anywhere;
}

.cookie-purpose {
	font-size: 0.76em;
	line-height: 1.35;
	color: #3a5b6c;
}

.cookie-duration {
	font-size: 0.68em;
	font-weight: 600;
	color: #7a96a3;
	white-space: nowrap;
}

html.cookie-banner-open .contact-fab {
	bottom: calc(8.75em + env(safe-area-inset-bottom, 0px));
}

html.cookie-banner-open.cookie-details-open .contact-fab {
	bottom: calc(13em + env(safe-area-inset-bottom, 0px));
}

@media screen and (max-width: 720px) {
	html.cookie-banner-open .cookie-banner,
	html.cookie-banner-open #cookie-banner {
		left: max(12px, env(safe-area-inset-left, 0px));
		right: max(12px, env(safe-area-inset-right, 0px));
		bottom: max(12px, env(safe-area-inset-bottom, 0px));
		width: auto;
		min-width: 0;
		max-width: none;
		max-height: min(72vh, 22em);
	}

	.cookie-pref-line {
		white-space: normal;
	}

	.cookie-more-link,
	#cookie-more {
		display: inline-block;
		margin-left: 0.4em;
	}

	.cookie-info-row {
		grid-template-columns: auto 1fr;
	}

	.cookie-duration {
		grid-column: 2;
	}
}
