/* ==========================================================================
   Aktuelt Samtykke – cookiebjælke, Tilpas-panel og pladsholdere.
   Bruger Aktuelt-temaets farver og skrifter, men virker også med andre temaer.
   ========================================================================== */

.aks-bar, .aks-modal, .aks-embed, .aks-declaration {
	--aks-primary: var(--primary, #162c6f);
	--aks-primary-hover: #0f2156;
	--aks-fg: var(--fg, #12161f);
	--aks-muted: var(--muted, #545b69);
	--aks-border: var(--border, #d3d7e1);
	--aks-soft: var(--soft, #f7f9fc);
	--aks-serif: var(--serif, "Instrument Serif", Georgia, "Times New Roman", serif);
	--aks-sans: var(--sans, "Work Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
}
.aks-bar *, .aks-modal *, .aks-embed * { box-sizing: border-box; }
.aks-bar[hidden], .aks-modal[hidden], .aks-panel-id[hidden] { display: none !important; }

/* ---------- Knapper ---------- */
.aks-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 22px;
	margin: 0;
	border: 1px solid var(--aks-primary);
	border-radius: 0;
	background: var(--aks-primary);
	color: #fff;
	font-family: var(--aks-sans);
	font-size: 12px;
	line-height: 16px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}
.aks-btn:hover { background: var(--aks-primary-hover); border-color: var(--aks-primary-hover); color: #fff; }
.aks-btn:focus-visible { outline: 2px solid var(--aks-primary); outline-offset: 2px; }
.aks-btn--ghost { background: #fff; color: var(--aks-primary); }
.aks-btn--ghost:hover { background: var(--aks-soft); color: var(--aks-primary); border-color: var(--aks-primary); }
.aks-btn--link {
	height: 44px;
	padding: 0 6px;
	background: none;
	border-color: transparent;
	color: var(--aks-fg);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.aks-btn--link:hover { background: none; border-color: transparent; color: var(--aks-primary); }

/* ---------- Bjælke ---------- */
.aks-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	background: #fff;
	color: var(--aks-fg);
	border-top: 1px solid var(--aks-border);
	box-shadow: 0 -12px 32px rgba(18, 22, 31, .10), 0 -2px 6px rgba(18, 22, 31, .04);
	font-family: var(--aks-sans);
	animation: aks-up .25s ease-out;
}
@keyframes aks-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .aks-bar { animation: none; } }

.aks-bar-inner {
	max-width: var(--container, 1280px);
	margin: 0 auto;
	padding: 24px var(--gutter, 24px);
	display: flex;
	align-items: center;
	gap: 40px;
}
.aks-bar-text { flex: 1; min-width: 0; }
.aks-bar-title {
	margin: 0 0 4px;
	font-family: var(--aks-serif);
	font-size: 26px;
	line-height: 32px;
	font-weight: 400;
	color: var(--aks-fg);
}
.aks-bar-body {
	margin: 0;
	max-width: 760px;
	font-size: 14px;
	line-height: 22px;
	color: var(--aks-muted);
}
.aks-bar-body a, .aks-panel-text a {
	color: var(--aks-primary);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.aks-bar-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.aks-bar-actions .aks-btn:not(.aks-btn--link) { min-width: 148px; }

/* Plads til bjælken, så den ikke skjuler footeren. */
html.aks-bar-open body { padding-bottom: var(--aks-bar-h, 0); }

/* ---------- Tilpas-panel ---------- */
.aks-modal {
	position: fixed;
	inset: 0;
	z-index: 99995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: var(--aks-sans);
	color: var(--aks-fg);
}
html.aks-modal-open { overflow: hidden; }
.aks-backdrop { position: absolute; inset: 0; background: rgba(18, 22, 31, .55); }
.aks-panel {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: 0 24px 64px rgba(18, 22, 31, .25);
	outline: none;
}
.aks-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--aks-border);
}
.aks-panel-title {
	margin: 0;
	font-family: var(--aks-serif);
	font-size: 30px;
	line-height: 36px;
	font-weight: 400;
}
.aks-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0 -8px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--aks-fg);
	cursor: pointer;
}
.aks-close:hover { color: var(--aks-primary); }
.aks-panel-body { flex: 1; overflow-y: auto; padding: 20px 24px 8px; overscroll-behavior: contain; }
.aks-panel-text { margin: 0 0 16px; font-size: 14px; line-height: 22px; color: var(--aks-muted); }

.aks-cat { padding: 16px 0; border-top: 1px solid var(--aks-border); }
.aks-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aks-cat-label { font-size: 15px; line-height: 22px; font-weight: 600; }
.aks-always {
	font-size: 11px;
	line-height: 16px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--aks-primary);
	white-space: nowrap;
}
.aks-cat-desc { margin: 6px 0 0 56px; font-size: 14px; line-height: 21px; color: var(--aks-muted); }

/* Kontakt */
.aks-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; }
.aks-switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}
.aks-switch-ui {
	position: relative;
	flex: none;
	width: 44px;
	height: 24px;
	border-radius: 12px;
	background: #b9bec9;
	transition: background .15s;
}
.aks-switch-ui::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
	transition: transform .15s;
}
.aks-switch input:checked + .aks-switch-ui { background: var(--aks-primary); }
.aks-switch input:checked + .aks-switch-ui::after { transform: translateX(20px); }
.aks-switch input:disabled + .aks-switch-ui { opacity: .45; }
.aks-switch input:disabled ~ .aks-cat-label { cursor: default; }
.aks-switch:has(input:disabled) { cursor: default; }
.aks-switch input:focus-visible + .aks-switch-ui { outline: 2px solid var(--aks-primary); outline-offset: 2px; }

.aks-cat-cookies { margin: 10px 0 0 56px; font-size: 13px; line-height: 19px; }
.aks-cat-cookies summary {
	cursor: pointer;
	color: var(--aks-primary);
	font-weight: 600;
	list-style-position: inside;
}
.aks-cat-cookies ul { list-style: none; margin: 8px 0 0; padding: 0; }
.aks-cat-cookies li { padding: 8px 0; border-top: 1px solid var(--aks-border); color: var(--aks-muted); }
.aks-cat-cookies li:first-child { border-top: 0; }
.aks-cat-cookies code, .aks-panel-id code, .aks-table code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	color: var(--aks-fg);
	background: var(--aks-soft);
	padding: 1px 5px;
	word-break: break-all;
}
.aks-panel-id { margin: 8px 0 12px; font-size: 12px; color: var(--aks-muted); }

.aks-panel-actions {
	display: flex;
	gap: 12px;
	padding: 16px 24px;
	border-top: 1px solid var(--aks-border);
	background: #fff;
}
.aks-panel-actions .aks-btn { flex: 1; padding: 0 12px; }

/* ---------- Pladsholder for indlejret indhold ---------- */
.aks-embed {
	position: relative;
	width: 100%;
	aspect-ratio: var(--aks-ratio, 16 / 9);
	min-height: 220px;
	margin: 0 0 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--aks-soft);
	border: 1px solid var(--aks-border);
	font-family: var(--aks-sans);
	color: var(--aks-fg);
	text-align: center;
}
.aks-embed-inner { max-width: 440px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.aks-embed-text { margin: 0; font-size: 15px; line-height: 22px; color: var(--aks-fg); }
.aks-embed-settings {
	font-size: 13px;
	color: var(--aks-muted) !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}
.aks-embed-loaded { margin: 0 0 24px; }
.aks-embed-loaded > *:last-child { margin-bottom: 0; }
figure .aks-embed, .wp-block-embed__wrapper .aks-embed { margin-bottom: 0; }

/* ---------- Cookieliste ([cookieliste]) ---------- */
.aks-declaration h3 { margin-top: 32px; }
.aks-table-wrap { overflow-x: auto; margin: 12px 0 8px; }
.aks-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.aks-table th, .aks-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--aks-border); }
.aks-table th { font-size: 11px; line-height: 16px; font-weight: 700; text-transform: uppercase; color: var(--aks-muted); background: var(--aks-soft); }
.aks-table td:first-child { min-width: 140px; }
.aks-declaration-meta { font-size: 13px; color: var(--aks-muted); }
.aks-open-settings { cursor: pointer; }
.aks-declaration a.aks-open-settings,
.entry-content .aks-declaration a.aks-open-settings {
	font-family: var(--aks-sans);
	line-height: 16px;
	letter-spacing: .02em;
}
.aks-declaration .aks-open-settings {
	display: inline-flex;
	align-items: center;
	height: 44px;
	padding: 0 22px;
	background: var(--aks-primary);
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none !important;
}
.aks-declaration .aks-open-settings:hover { background: var(--aks-primary-hover); }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
	.aks-bar-inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
	.aks-bar-title { font-size: 22px; line-height: 28px; }
	.aks-bar-body { font-size: 13px; line-height: 20px; }
	.aks-bar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	.aks-bar-actions .aks-btn:not(.aks-btn--link) { min-width: 0; }
	.aks-bar-actions .aks-btn--link { grid-column: 1 / -1; grid-row: 2; height: 32px; }
}
@media (max-width: 600px) {
	.aks-table thead { display: none; }
	.aks-table, .aks-table tbody, .aks-table tr, .aks-table td { display: block; width: 100%; }
	.aks-table tr { padding: 12px 0; border-bottom: 1px solid var(--aks-border); }
	.aks-table td { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 3px 0; border: 0; }
	.aks-table td::before {
		content: attr(data-label);
		font-size: 11px;
		line-height: 20px;
		font-weight: 700;
		text-transform: uppercase;
		color: var(--aks-muted);
	}
	.aks-table td:first-child { min-width: 0; }
	.aks-table-wrap { overflow: visible; border-top: 1px solid var(--aks-border); }
	.aks-modal { padding: 0; align-items: flex-end; }
	.aks-panel { max-width: none; max-height: 92vh; max-height: 92dvh; }
	.aks-panel-head { padding: 16px; }
	.aks-panel-title { font-size: 26px; line-height: 32px; }
	.aks-panel-body { padding: 16px 16px 4px; }
	.aks-cat-desc, .aks-cat-cookies { margin-left: 0; }
	.aks-panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
	.aks-panel-actions .aks-btn--ghost { grid-column: 1 / -1; grid-row: 2; }
	.aks-embed { min-height: 200px; }
	.aks-embed-inner { padding: 16px; }
}
