/*
 * 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;
}

.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 .vecc-btn {
	flex: 1 1 0;
	min-width: 118px;
}

.vecc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 11px 10px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	line-height: 1.25;
	border-radius: calc(var(--vecc-radius) - 3px);
	border: 2px solid var(--vecc-accent);
	background: var(--vecc-accent);
	word-break: normal;
	overflow-wrap: normal;
	color: var(--vecc-btn-text);
	cursor: pointer;
	transition: filter .15s ease;
	box-sizing: border-box;
}

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

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

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

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

.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 */
.vecc-btn:focus-visible,
.vecc-link:focus-visible,
.vecc-textlink:focus-visible,
.vecc-back:focus-visible,
.vecc-reopen:focus-visible,
.vecc-switch__input:focus-visible + .vecc-switch__track {
	outline: 3px solid #0a84ff;
	outline-offset: 2px;
}

/* Genåbn-knap: permanent adgang til at trække samtykke tilbage */
.vecc-reopen {
	position: fixed;
	z-index: 2147482000;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 14px;
	background: var(--vecc-bg);
	color: var(--vecc-text);
	border: 1px solid var(--vecc-border);
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(10, 22, 33, .16);
	cursor: pointer;
	font: inherit;
	font-size: 14px;
}

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

.vecc-reopen__text { display: none; }
.vecc-reopen:hover .vecc-reopen__text,
.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 .vecc-btn { flex: 1 1 100%; }

	.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,
	.vecc-reopen { display: none !important; }
}
