/*
 * VisionEyed Cookie Consent
 *
 * Designprincip: alle valgknapper har PRÆCIS samme visuelle vægt.
 * Der findes bevidst ingen "primær" knapstil, fordi fremhævelse af
 * "Accepter alle" frem for "Afvis alle" er ulovlig nudging jf.
 * fællesvejledningen (Datatilsynet/Digitaliseringsstyrelsen, maj 2025)
 * og EDPB Guidelines 3/2022 om deceptive design patterns.
 */

:root {
	--vecc-bg: #ffffff;
	--vecc-text: #15202b;
	--vecc-muted: #4a5a68;
	--vecc-accent: #1f7a8c;
	--vecc-btn-text: #ffffff;
	--vecc-border: #d9e0e6;
	--vecc-radius: 10px;
	--vecc-font: inherit;
	--vecc-shadow: 0 12px 40px rgba(10, 22, 33, .18);
}

.vecc-root[hidden],
.vecc-view[hidden] {
	display: none !important;
}

/* Nulstiller tema-styling der ellers slår igennem på plugin'ets elementer. */
.vecc-root button,
.vecc-root input,
button.vecc-reopen {
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
}

.vecc-root a {
	box-shadow: none;
	background: none;
}

.vecc-root {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	font-family: var(--vecc-font);
	font-size: 15px;
	line-height: 1.55;
	color: var(--vecc-text);
	pointer-events: none;
}

.vecc-overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 22, 33, .55);
	pointer-events: auto;
}

.vecc-dialog {
	position: absolute;
	pointer-events: auto;
	background: var(--vecc-bg);
	color: var(--vecc-text);
	border: 1px solid var(--vecc-border);
	border-radius: var(--vecc-radius);
	box-shadow: var(--vecc-shadow);
	width: min(520px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px;
	box-sizing: border-box;
}

/* Placering */
.vecc-pos--bottom-left .vecc-dialog { bottom: 16px; left: 16px; }
.vecc-pos--bottom-right .vecc-dialog { bottom: 16px; right: 16px; }
.vecc-pos--top-left .vecc-dialog { top: 16px; left: 16px; }
.vecc-pos--top-right .vecc-dialog { top: 16px; right: 16px; }

.vecc-layout--center .vecc-dialog {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	bottom: auto;
	right: auto;
}

.vecc-layout--bar .vecc-dialog {
	width: 100%;
	max-width: none;
	left: 0;
	right: 0;
	bottom: 0;
	top: auto;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
	transform: none;
}

.vecc-layout--bar .vecc-dialog > .vecc-view {
	max-width: 1100px;
	margin: 0 auto;
}

/* Indhold */
.vecc-logo {
	max-height: 38px;
	width: auto;
	margin: 0 0 14px;
	display: block;
}

.vecc-title {
	margin: 0 0 10px;
	font-size: 19px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--vecc-text);
}

.vecc-body {
	margin: 0 0 12px;
	color: var(--vecc-text);
}

.vecc-body p { margin: 0 0 8px; }
.vecc-body p:last-child { margin-bottom: 0; }

.vecc-meta {
	margin: 0 0 6px;
	font-size: 13px;
	color: var(--vecc-muted);
}

.vecc-meta__label {
	font-weight: 600;
	color: var(--vecc-text);
}

.vecc-links {
	margin: 12px 0 16px;
	font-size: 13px;
}

.vecc-link,
.vecc-textlink {
	color: var(--vecc-accent);
	text-decoration: underline;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

.vecc-link:hover,
.vecc-textlink:hover { text-decoration: none; }

/* Knapper: identisk størrelse, form, vægt og kontrast */
.vecc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0 12px;
}

.vecc-actions button.vecc-btn {
	flex: 1 1 0 !important;
	min-width: 118px !important;
}

button.vecc-btn,
.vecc-root button.vecc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px !important;
	padding: 11px 10px !important;
	margin: 0 !important;
	font-family: var(--vecc-font, inherit) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	font-style: normal !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-align: center !important;
	line-height: 1.25 !important;
	word-break: normal;
	overflow-wrap: normal;
	white-space: normal;
	cursor: pointer;
	transition: filter .15s ease;
	box-sizing: border-box !important;
	width: auto;
	height: auto !important;
	text-shadow: none !important;
	/* !important beskytter mod temaer der styler alle button-elementer globalt. */
	border: 2px solid var(--vecc-accent) !important;
	border-radius: calc(var(--vecc-radius) - 3px) !important;
	background: var(--vecc-accent) !important;
	background-image: none !important;
	color: var(--vecc-btn-text) !important;
	box-shadow: none !important;
	outline-offset: 2px;
}

button.vecc-btn:hover { filter: brightness(1.08); }
button.vecc-btn:active { filter: brightness(.94); }

.vecc-btn--outline button.vecc-btn {
	background: transparent !important;
	color: var(--vecc-accent) !important;
}

.vecc-btn--outline button.vecc-btn:hover {
	background: rgba(0, 0, 0, .04) !important;
	filter: none;
}

button.vecc-btn--inline {
	min-height: 40px !important;
	padding: 8px 14px !important;
	font-size: 14px !important;
}

.vecc-back {
	background: none;
	border: 0;
	padding: 0 0 10px;
	font: inherit;
	font-size: 14px;
	color: var(--vecc-accent);
	cursor: pointer;
	text-decoration: underline;
}

.vecc-withdraw,
.vecc-credit {
	margin: 0;
	font-size: 12px;
	color: var(--vecc-muted);
}

.vecc-credit { margin-top: 8px; }
.vecc-credit a { color: var(--vecc-muted); }

/* Kategorier */
.vecc-cats {
	margin: 14px 0 4px;
	border-top: 1px solid var(--vecc-border);
}

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

.vecc-cat__head {
	display: flex;
	align-items: center;
	gap: 10px;
}

.vecc-cat__label {
	font-weight: 600;
	flex: 1 1 auto;
	cursor: pointer;
}

.vecc-cat__always {
	font-size: 12px;
	color: var(--vecc-muted);
	white-space: nowrap;
}

.vecc-cat__desc {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--vecc-muted);
}

/* Kontakt: switch bygget så tastatur og skærmlæser bruger det rigtige input */
.vecc-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 28px;
	flex: 0 0 auto;
}

.vecc-switch__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.vecc-switch__input[disabled] { cursor: not-allowed; }

.vecc-switch__track {
	position: absolute;
	inset: 0;
	background: #b9c4cd;
	border-radius: 999px;
	transition: background .18s ease;
	pointer-events: none;
}

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

.vecc-switch__input:checked + .vecc-switch__track { background: var(--vecc-accent); }
.vecc-switch__input:checked + .vecc-switch__track::after { transform: translateX(22px); }
.vecc-switch__input[disabled] + .vecc-switch__track { opacity: .6; }

/* Fokus: altid synligt */
button.vecc-btn:focus-visible,
.vecc-link:focus-visible,
.vecc-textlink:focus-visible,
.vecc-back:focus-visible,
button.vecc-reopen:focus-visible,
.vecc-switch__input:focus-visible + .vecc-switch__track {
	outline: 3px solid #0a84ff !important;
	outline-offset: 2px !important;
}

/* Genåbn-knap: permanent adgang til at trække samtykke tilbage */
button.vecc-reopen {
	position: fixed;
	z-index: 2147482000;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--vecc-reopen-size, 48px) !important;
	min-width: var(--vecc-reopen-size, 48px) !important;
	width: auto;
	height: auto !important;
	padding: 10px 13px !important;
	margin: 0 !important;
	cursor: pointer;
	font-family: var(--vecc-font, inherit) !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	line-height: 1 !important;
	box-sizing: border-box !important;
	/* !important beskytter mod temaer der styler alle button-elementer globalt. */
	background: var(--vecc-reopen-bg, var(--vecc-bg)) !important;
	background-image: none !important;
	color: var(--vecc-reopen-color, var(--vecc-text)) !important;
	border: var(--vecc-reopen-border, none) !important;
	border-radius: var(--vecc-reopen-radius, 999px) !important;
	box-shadow: var(--vecc-reopen-shadow, 0 6px 20px rgba(10, 22, 33, .16)) !important;
	outline: none;
}

button.vecc-reopen svg {
	display: block;
	flex: 0 0 auto;
}

button.vecc-reopen--bottom-left { bottom: 16px; left: 16px; }
button.vecc-reopen--bottom-right { bottom: 16px; right: 16px; }
button.vecc-reopen--top-left { top: 16px; left: 16px; }
button.vecc-reopen--top-right { top: 16px; right: 16px; }

.vecc-reopen__text { display: none; }
button.vecc-reopen:hover .vecc-reopen__text,
button.vecc-reopen:focus-visible .vecc-reopen__text { display: inline; }

/* Placeholder for blokeret indhold */
.vecc-placeholder {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 20px;
	background: #f4f6f8;
	border: 1px dashed var(--vecc-border);
	border-radius: var(--vecc-radius);
	color: var(--vecc-text);
	font-size: 14px;
	margin: 0 0 12px;
}

.vecc-placeholder__service {
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--vecc-muted);
}

.vecc-placeholder__text { margin: 0; }

/* Cookiedeklaration */
.vecc-declaration__title { margin: 24px 0 4px; }
.vecc-declaration__desc { margin: 0 0 10px; color: var(--vecc-muted); }

.vecc-declaration__table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 8px;
	font-size: 14px;
}

.vecc-declaration__table th,
.vecc-declaration__table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid var(--vecc-border);
	vertical-align: top;
}

.vecc-declaration__table th { font-weight: 700; }

/* Lås baggrundsscroll når dialogen er åben som modal */
html.vecc-open { overflow: hidden; }

@media (max-width: 600px) {
	.vecc-dialog {
		width: calc(100vw - 16px);
		left: 8px !important;
		right: 8px !important;
		bottom: 8px !important;
		top: auto !important;
		transform: none !important;
		padding: 18px;
	}

	.vecc-layout--bar .vecc-dialog { width: 100%; left: 0 !important; right: 0 !important; }

	.vecc-actions button.vecc-btn { flex: 1 1 100% !important; }

	.vecc-declaration__table,
	.vecc-declaration__table tbody,
	.vecc-declaration__table tr,
	.vecc-declaration__table td { display: block; width: 100%; box-sizing: border-box; }

	.vecc-declaration__table thead { display: none; }
	.vecc-declaration__table tr { border-bottom: 2px solid var(--vecc-border); padding: 6px 0; }
	.vecc-declaration__table td { border: 0; padding: 3px 0; }
}

@media (prefers-reduced-motion: reduce) {
	.vecc-btn,
	.vecc-switch__track,
	.vecc-switch__track::after { transition: none; }
}

@media print {
	.vecc-root,
	button.vecc-reopen { display: none !important; }
}

/* -------------------------------------------------------------------------
   Tjenesteliste: viser brugeren hvilke scripts sitet faktisk indlæser
   ------------------------------------------------------------------------- */

.vecc-services {
	margin: 8px 0 0;
	font-size: 13px;
}

.vecc-services__toggle {
	cursor: pointer;
	color: var(--vecc-accent);
	text-decoration: underline;
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 0;
	min-height: 28px;
}

.vecc-services__toggle::-webkit-details-marker { display: none; }

.vecc-services__toggle::before {
	content: "";
	width: 0;
	height: 0;
	border-left: 5px solid currentColor;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	transition: transform .15s ease;
	flex: 0 0 auto;
}

.vecc-services[open] > .vecc-services__toggle::before { transform: rotate(90deg); }

.vecc-services__count { color: var(--vecc-muted); text-decoration: none; }

.vecc-services__table {
	width: 100%;
	border-collapse: collapse;
	margin: 6px 0 2px;
	font-size: 12.5px;
	table-layout: fixed;
}

.vecc-services__table td {
	padding: 7px 8px 7px 0;
	vertical-align: top;
	border-top: 1px solid var(--vecc-border);
	color: var(--vecc-muted);
	word-break: break-word;
}

.vecc-services__name {
	width: 38%;
	color: var(--vecc-text);
}

.vecc-services__name strong { display: block; font-weight: 600; }

.vecc-services__provider {
	display: block;
	font-size: 11.5px;
	color: var(--vecc-muted);
	margin-top: 1px;
}

.vecc-meta--services { margin-top: 10px; }

.vecc-declaration__services { margin: 0 0 18px; }

.vecc-declaration__auto {
	font-size: 13px;
	color: var(--vecc-muted);
	font-style: italic;
	margin: 0 0 10px;
}

@media (max-width: 600px) {
	.vecc-services__table,
	.vecc-services__table tbody,
	.vecc-services__table tr,
	.vecc-services__table td { display: block; width: 100%; }

	.vecc-services__table td { border-top: 0; padding: 2px 0; }
	.vecc-services__table tr { border-top: 1px solid var(--vecc-border); padding: 7px 0; }
	.vecc-services__name { width: 100%; }
}

/* =========================================================================
   KOMPAKT VISNING: faner, kategorirække og harmonika
   ========================================================================= */

.vecc-mode--compact .vecc-dialog {
	width: min(680px, calc(100vw - 32px));
	padding: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.vecc-head {
	display: flex;
	align-items: center;
	padding: 16px 22px 0;
}

.vecc-mode--compact .vecc-logo { margin: 0; max-height: 34px; }

/* Faner */
.vecc-tabs {
	display: flex;
	border-bottom: 1px solid var(--vecc-border);
	padding: 0 10px;
	flex: 0 0 auto;
}

button.vecc-tab {
	flex: 1 1 0 !important;
	padding: 15px 8px !important;
	margin: 0 !important;
	min-height: 48px !important;
	background: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-bottom: 3px solid transparent !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--vecc-muted) !important;
	font-family: var(--vecc-font, inherit) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-shadow: none !important;
	line-height: 1.2 !important;
	cursor: pointer;
	box-sizing: border-box !important;
	transition: color .15s ease, border-color .15s ease;
}

button.vecc-tab:hover { color: var(--vecc-text) !important; }

button.vecc-tab.is-active {
	color: var(--vecc-accent) !important;
	border-bottom-color: var(--vecc-accent) !important;
}

button.vecc-tab:focus-visible {
	outline: 3px solid #0a84ff !important;
	outline-offset: -3px !important;
}

/* Panelområde */
.vecc-panels {
	padding: 20px 22px 4px;
	overflow-y: auto;
	flex: 1 1 auto;
	max-height: min(52vh, 460px);
}

.vecc-mode--compact .vecc-title { font-size: 18px; margin-bottom: 8px; }
.vecc-mode--compact .vecc-body { font-size: 14.5px; }

/* Kategorirække med til- og fravalg */
.vecc-catrow {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 1px;
	margin: 16px 0 4px;
	background: var(--vecc-border);
	border: 1px solid var(--vecc-border);
	border-radius: calc(var(--vecc-radius) - 3px);
	overflow: hidden;
}

.vecc-catrow__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 14px 8px;
	background: var(--vecc-bg);
	text-align: center;
}

.vecc-catrow__label {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--vecc-text);
	cursor: pointer;
	line-height: 1.25;
}

.vecc-catrow__always {
	font-size: 11px;
	color: var(--vecc-muted);
	line-height: 1;
}

/* Harmonika under Detaljer */
.vecc-acc { border-bottom: 1px solid var(--vecc-border); }
.vecc-acc:last-child { border-bottom: 0; }

.vecc-acc__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 0;
}

button.vecc-acc__trigger {
	flex: 1 1 auto !important;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 12px 0 !important;
	margin: 0 !important;
	min-height: 48px !important;
	background: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--vecc-text) !important;
	font-family: var(--vecc-font, inherit) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-align: left !important;
	text-shadow: none !important;
	cursor: pointer;
	box-sizing: border-box !important;
}

.vecc-acc__chevron {
	width: 0;
	height: 0;
	flex: 0 0 auto;
	border-left: 5px solid currentColor;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	transition: transform .15s ease;
}

button.vecc-acc__trigger[aria-expanded="true"] .vecc-acc__chevron { transform: rotate(90deg); }

.vecc-acc__count {
	min-width: 26px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--vecc-border);
	color: var(--vecc-muted);
	font-size: 12px;
	font-weight: 600;
	text-align: center;
}

.vecc-acc__panel { padding: 0 0 14px 14px; }
.vecc-acc__desc { margin: 0 0 8px; font-size: 13.5px; color: var(--vecc-muted); }
.vecc-acc__panel .vecc-services { margin: 0; }
.vecc-acc__panel .vecc-services__table td { border-top: 1px solid var(--vecc-border); }

/* Handlingsknapper og fod */
.vecc-mode--compact .vecc-actions {
	margin: 0;
	padding: 14px 22px;
	border-top: 1px solid var(--vecc-border);
	flex: 0 0 auto;
}

.vecc-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 14px;
	padding: 0 22px 14px;
	flex: 0 0 auto;
}

.vecc-foot .vecc-links,
.vecc-foot .vecc-credit { margin: 0; font-size: 12.5px; }

.vecc-mode--compact .vecc-meta { font-size: 13.5px; margin-bottom: 8px; }
.vecc-mode--compact .vecc-meta--stamp { margin-top: 12px; font-size: 12px; }

@media (max-width: 600px) {
	.vecc-mode--compact .vecc-dialog { width: calc(100vw - 16px); }
	.vecc-catrow { grid-template-columns: repeat(2, 1fr); }
	.vecc-panels { padding: 16px 16px 4px; max-height: 46vh; }
	.vecc-mode--compact .vecc-actions { padding: 12px 16px; }
	.vecc-foot { padding: 0 16px 12px; }
	button.vecc-tab { font-size: 14px !important; padding: 13px 4px !important; }
}

.vecc-microline {
	margin: 10px 0 0;
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--vecc-muted);
}

.vecc-microline .vecc-textlink { font-size: 11.5px; }
