/* Cookie-samtykke: dialog med overlay (desktop) / bundark (mobil). Bruger temaets CSS-variabler, hvis de findes. */
.bc-root {
	--bc-accent: var(--bt-color-accent, #1ca0e3);
	--bc-accent-dark: var(--bt-color-accent-dark, #1786be);
	--bc-navy: var(--bt-color-primary-dark, #0b1b2b);
	--bc-text: var(--bt-color-text, #0f2337);
	--bc-muted: var(--bt-color-text-muted, #55677a);
	--bc-border: var(--bt-color-border, #dfe4e9);
	position: fixed; inset: 0; z-index: 99999;
	display: flex; align-items: center; justify-content: center; padding: 16px;
	font-family: var(--bt-font-base, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
	color: var(--bc-text);
	visibility: hidden; pointer-events: none;
}
.bc-root.is-open { visibility: visible; pointer-events: auto; }
.bc-overlay {
	position: absolute; inset: 0; background: rgba(11, 27, 43, .62);
	opacity: 0; transition: opacity .2s ease;
	-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.bc-root.is-open .bc-overlay { opacity: 1; }

.bc-modal {
	position: relative; width: 100%; max-width: 620px;
	max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	display: flex; flex-direction: column;
	background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(6, 16, 27, .45);
	transform: translateY(14px) scale(.985); opacity: 0;
	transition: transform .22s ease, opacity .22s ease;
	outline: none;
}
.bc-root.is-open .bc-modal { transform: none; opacity: 1; }

.bc-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 24px 28px 8px; }
.bc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; min-height: 32px; }
.bc-brand { font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--bc-navy); }
.bc-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--bc-border); background: #fff; color: var(--bc-text); font-size: 22px; line-height: 1; cursor: pointer; }
.bc-x:hover { background: #f1f4f7; }
.bc-modal h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; color: var(--bc-text); outline: none; }
.bc-text { margin: 0 0 8px; font-size: 15px; line-height: 1.55; color: var(--bc-muted); }
.bc-links { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.bc-links a { color: var(--bc-accent-dark); font-weight: 600; text-decoration: underline; }

.bc-cats { display: grid; gap: 10px; margin-bottom: 8px; }
.bc-cat {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 14px 16px; border: 1px solid var(--bc-border); border-radius: 12px; cursor: pointer; background: #fff;
}
.bc-cat:hover { background: #f7f9fa; }
.bc-cat-text { display: grid; gap: 2px; font-size: 14px; line-height: 1.45; color: var(--bc-muted); }
.bc-cat-text strong { font-size: 15.5px; color: var(--bc-text); }

/* Kontakt (switch) */
.bc-switch { position: relative; flex: none; width: 48px; height: 28px; }
.bc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.bc-slider { position: absolute; inset: 0; border-radius: 999px; background: #c3cdd6; transition: background .18s ease; }
.bc-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s ease; }
.bc-switch input:checked + .bc-slider { background: var(--bc-accent); }
.bc-switch input:checked + .bc-slider::after { transform: translateX(20px); }
.bc-switch input:disabled { cursor: not-allowed; }
.bc-switch input:disabled + .bc-slider { opacity: .55; }
.bc-switch input:focus-visible + .bc-slider { outline: 3px solid var(--bc-navy); outline-offset: 2px; }

.bc-details-toggle { display: inline-block; margin: 6px 0 4px; padding: 6px 0; border: 0; background: none; color: var(--bc-accent-dark); font: inherit; font-size: 14.5px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.bc-details { padding: 4px 0 12px; font-size: 14px; line-height: 1.5; }
.bc-details[hidden] { display: none; }
.bc-details h3 { margin: 14px 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--bc-muted); }
.bc-details ul { margin: 0; padding-left: 18px; }
.bc-details li { margin-bottom: 8px; }
.bc-muted { color: var(--bc-muted); }

.bc-footer { padding: 14px 28px 20px; border-top: 1px solid var(--bc-border); background: #fff; border-radius: 0 0 16px 16px; }
.bc-footer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bc-root button { box-shadow: none; text-transform: none; }
.bc-btn { min-height: 48px; padding: 12px 16px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 800; letter-spacing: .01em; cursor: pointer; border: 2px solid transparent; }
.bc-root [hidden], .bc-btn[hidden], .bc-x[hidden] { display: none !important; }
.bc-btn-primary { background: var(--bc-accent); color: #fff; border-color: var(--bc-accent); }
.bc-btn-primary:hover { background: var(--bc-accent-dark); border-color: var(--bc-accent-dark); }
.bc-btn-outline { background: #fff; color: var(--bc-text); border-color: var(--bc-text); }
.bc-btn-outline:hover { background: #f1f4f7; }
.bc-btn-ghost { width: 100%; margin-bottom: 10px; background: var(--bc-navy); color: #fff; border-color: var(--bc-navy); }
.bc-btn:focus-visible, .bc-x:focus-visible, .bc-details-toggle:focus-visible, .bc-fab:focus-visible { outline: 3px solid var(--bc-accent); outline-offset: 2px; }

/* Cookie-ikon nederst til venstre: ændre/trække samtykke tilbage */
.bc-fab {
	position: fixed; left: 16px; bottom: 16px; z-index: 99990;
	width: 46px; height: 46px; padding: 0; display: flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%; background: var(--bt-color-primary-dark, #0b1b2b); color: #fff; cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.bc-fab[hidden] { display: none; }
.bc-fab:hover { background: var(--bt-color-accent-dark, #1786be); }
html.bc-lock { overflow: hidden; }

/* Mobil: bundark */
@media (max-width: 640px) {
	.bc-root { padding: 0; align-items: flex-end; }
	.bc-modal { max-width: none; max-height: 92vh; max-height: 92dvh; border-radius: 18px 18px 0 0; transform: translateY(30px); }
	.bc-scroll { padding: 18px 18px 6px; }
	.bc-modal h2 { font-size: 21px; }
	.bc-text { font-size: 14px; }
	.bc-cat { padding: 12px 14px; }
	.bc-footer { padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-radius: 0; }
	.bc-btn { min-height: 50px; font-size: 15px; }
	.bc-fab { left: 12px; bottom: 12px; width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
	.bc-overlay, .bc-modal, .bc-slider, .bc-slider::after { transition: none; }
}

/* Logo i dialogen (leveres af temaet via filteret bc_brand_logo) */
.bc-brand-logo { display: block; height: 34px; width: auto; max-width: 70%; }
