/* Cookiesamtykke: banner, indstillinger og cookieoversigt */

#nk-cookie,
.nk-cookie-link,
.nk-cookieoversigt {
	--nk-ink: #173e2b;
	--nk-muted: #5f6b64;
	--nk-line: #ddd4bf;
	--nk-cream: #f6f1e6;
	--nk-paper: #fffdf8;
}

#nk-cookie[hidden],
#nk-cookie [hidden] {
	display: none !important;
}

#nk-cookie {
	position: fixed;
	z-index: 2147483000;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	justify-content: center;
	padding: 12px;
	pointer-events: none; /* siden bag banneret kan stadig bruges */
}

/* Låst: mørk baggrund over hele siden og ingen scroll, indtil der er valgt */
#nk-cookie.nk-cookie--modal {
	top: 0;
	align-items: flex-end;
	background: rgba(0, 0, 0, 0.5);
	pointer-events: auto;
	overscroll-behavior: contain;
	touch-action: none;
}

#nk-cookie.nk-cookie--modal .nk-cookie__boks {
	touch-action: pan-y;
}

html.nk-cookie-laast,
html.nk-cookie-laast body {
	overflow: hidden !important;
}

@media (min-width: 601px) {
	#nk-cookie.nk-cookie--modal {
		align-items: center;
	}
}

#nk-cookie .nk-cookie__boks {
	pointer-events: auto;
	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 22px 24px 20px;
	border: 1px solid var(--nk-line);
	border-radius: 20px;
	background: var(--nk-paper);
	box-shadow: 0 12px 40px rgba(23, 62, 43, 0.18);
	color: var(--nk-ink);
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
}

#nk-cookie .nk-cookie__boks:focus {
	outline: none;
}

#nk-cookie .nk-cookie__titel {
	margin: 0 0 6px;
	padding: 0;
	color: var(--nk-ink);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
}

#nk-cookie .nk-cookie__tekst {
	margin: 0;
	color: var(--nk-muted);
	font-size: 16px; /* sidens skrift er smal, så 16px læses som ca. 14px i en normal skrift */
}

#nk-cookie .nk-cookie__tekst a {
	color: var(--nk-ink);
	text-decoration: underline;
}

/* Knapper: "Kun nødvendige" og "Acceptér alle" er ens, så ingen af dem fremhæves */
#nk-cookie .nk-cookie__knapper {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

/* Med indstillingerne åbne kan indholdet blive højt: knapperne bliver stående i bunden af boksen */
#nk-cookie.nk-cookie--valg .nk-cookie__knapper {
	position: sticky;
	bottom: -20px;
	margin-top: 0;
	padding: 14px 0 20px;
	background: var(--nk-paper);
}

#nk-cookie.nk-cookie--valg .nk-cookie__boks {
	padding-bottom: 0;
}

#nk-cookie .nk-cookie__knap {
	flex: 1 1 0;
	min-width: 150px;
	min-height: 48px;
	margin: 0;
	padding: 10px 18px;
	border: 1px solid var(--nk-ink);
	border-radius: 50px;
	background: var(--nk-ink);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-align: center;
	box-shadow: none;
	cursor: pointer;
}

#nk-cookie .nk-cookie__knap:hover {
	background: #0f2b1e;
	border-color: #0f2b1e;
	color: #fff;
}

#nk-cookie .nk-cookie__knap[data-nk-cookie="tilpas"],
#nk-cookie .nk-cookie__knap[data-nk-cookie="gem"] {
	background: #fff;
	color: var(--nk-ink);
}

#nk-cookie .nk-cookie__knap[data-nk-cookie="tilpas"]:hover,
#nk-cookie .nk-cookie__knap[data-nk-cookie="gem"]:hover {
	background: var(--nk-cream);
	color: var(--nk-ink);
}

#nk-cookie .nk-cookie__knap:focus-visible,
#nk-cookie .nk-cookie__kontakt:focus-visible,
#nk-cookie summary:focus-visible,
.nk-cookie-aabn:focus-visible {
	outline: 3px solid #7fb69a;
	outline-offset: 2px;
}

/* Valg pr. formål */
#nk-cookie .nk-cookie__valg {
	margin-top: 16px;
	border-top: 1px solid var(--nk-line);
}

#nk-cookie .nk-cookie__kat {
	padding: 14px 0;
	border-bottom: 1px solid var(--nk-line);
}

#nk-cookie .nk-cookie__kat-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

#nk-cookie .nk-cookie__kat-label {
	display: block;
	margin: 0;
	cursor: pointer;
}

#nk-cookie .nk-cookie__kat-titel {
	display: block;
	color: var(--nk-ink);
	font-size: 15px;
	font-weight: 700;
}

#nk-cookie .nk-cookie__kat-tekst {
	display: block;
	color: var(--nk-muted);
	font-size: 14px;
	font-weight: 400;
}

/* Afbryder */
#nk-cookie .nk-cookie__kontakt {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	position: relative;
	width: 46px;
	height: 26px;
	margin: 2px 0 0;
	padding: 0;
	border: 1px solid #b9b1a0;
	border-radius: 26px;
	background: #e9e4d8;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

#nk-cookie .nk-cookie__kontakt::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease;
}

#nk-cookie .nk-cookie__kontakt:checked {
	border-color: var(--nk-ink);
	background: var(--nk-ink);
}

#nk-cookie .nk-cookie__kontakt:checked::before {
	transform: translateX(20px);
}

#nk-cookie .nk-cookie__kontakt:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

#nk-cookie .nk-cookie__detaljer {
	margin-top: 8px;
}

#nk-cookie .nk-cookie__detaljer summary {
	display: inline-block;
	color: var(--nk-ink);
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

/* Cookietabel (banner og [nk_cookieoversigt]) */
.nk-cookie__tabelwrap {
	margin-top: 10px;
	overflow-x: auto;
}

table.nk-cookie__tabel {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 13px;
	line-height: 1.4;
}

table.nk-cookie__tabel th,
table.nk-cookie__tabel td {
	padding: 7px 10px 7px 0;
	border: 0;
	border-bottom: 1px solid #ddd4bf;
	background: transparent;
	color: #173e2b;
	text-align: left;
	vertical-align: top;
	word-break: break-word;
}

table.nk-cookie__tabel th {
	color: #5f6b64;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Link nederst på siden: her kan valget altid ændres */
.nk-cookie-link {
	padding: 10px 16px 14px;
	background: var(--nk-cream);
	text-align: center;
}

.nk-cookie-aabn {
	margin: 0;
	padding: 4px 6px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #173e2b;
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: underline;
	box-shadow: none;
	cursor: pointer;
}

.nk-cookie-aabn:hover,
.nk-cookie-aabn:focus {
	background: transparent;
	color: #0f2b1e;
}

.nk-cookie-aabn--knap {
	padding: 10px 20px;
	border: 1px solid #173e2b;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

/* Pladsholder for indlejrede videoer, indtil der er givet samtykke */
iframe[data-nk-src][hidden] {
	display: none !important;
}

.nk-video-pladsholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	aspect-ratio: 16 / 9;
	padding: 20px;
	border: 1px solid #ddd4bf;
	border-radius: 12px;
	background: #f6f1e6;
	color: #173e2b;
	text-align: center;
}

.nk-video-pladsholder p {
	max-width: 30em;
	margin: 0;
	color: #5f6b64;
	font-size: 15px;
	line-height: 1.45;
}

.nk-video-pladsholder__vis {
	min-height: 44px;
	margin: 0;
	padding: 10px 22px;
	border: 1px solid #173e2b;
	border-radius: 50px;
	background: #173e2b;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}

.nk-video-pladsholder__vis:hover,
.nk-video-pladsholder__vis:focus {
	background: #0f2b1e;
	border-color: #0f2b1e;
	color: #fff;
}

@media (max-width: 600px) {
	#nk-cookie {
		padding: 8px;
	}

	#nk-cookie .nk-cookie__boks {
		max-height: calc(100vh - 16px);
		max-height: calc(100dvh - 16px);
		padding: 18px 16px 16px;
		border-radius: 16px;
	}

	#nk-cookie .nk-cookie__knap {
		flex: 1 1 100%;
	}

	/* Med indstillingerne åbne står knapperne side om side, så de ikke dækker valgene */
	#nk-cookie.nk-cookie--valg .nk-cookie__knapper {
		bottom: -16px;
		gap: 6px;
		padding: 10px 0 16px;
	}

	#nk-cookie.nk-cookie--valg .nk-cookie__knap {
		flex: 1 1 0;
		min-width: 0;
		min-height: 44px;
		padding: 8px 6px;
		font-size: 13px;
	}

	table.nk-cookie__tabel thead {
		display: none;
	}

	table.nk-cookie__tabel tr {
		display: block;
		padding: 8px 0;
		border-bottom: 1px solid #ddd4bf;
	}

	table.nk-cookie__tabel td {
		display: block;
		padding: 2px 0;
		border: 0;
	}

	table.nk-cookie__tabel td::before {
		content: attr(data-label) ": ";
		color: #5f6b64;
		font-weight: 700;
	}
}

@media (prefers-reduced-motion: reduce) {
	#nk-cookie .nk-cookie__kontakt,
	#nk-cookie .nk-cookie__kontakt::before {
		transition: none;
	}
}
