/* Cookie Consent Manager - frontend + admin styles */

.ccm-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 999999;
	background: #ffffff;
	color: #111111;
	box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	border-top: 3px solid var(--ccm-accent, #b5451d);
}
.ccm-position-bottom { bottom: 0; }
.ccm-position-top { top: 0; box-shadow: 0 2px 12px rgba(0,0,0,0.15); border-top: none; border-bottom: 3px solid var(--ccm-accent, #b5451d); }

.ccm-banner-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 20px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.ccm-banner-content { flex: 1 1 480px; }
.ccm-banner-title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}
.ccm-banner-icon {
	flex-shrink: 0;
	border-radius: 50%;
}
.ccm-banner-content h2 { margin: 0; font-size: 18px; }
.ccm-banner-content p { margin: 0; font-size: 14px; line-height: 1.5; }
.ccm-banner-content a { color: inherit; text-decoration: underline; }

.ccm-banner-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	flex: 0 0 auto;
}

.ccm-btn {
	border: 2px solid transparent;
	border-radius: 999px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}
/* "Acceptér alle" og "Afvis alle" skal have samme visuelle vægt (samme størrelse,
   fyldt baggrund, tydelig kontrast) - kun "Tilpas" må være den mindre fremtrædende. */
.ccm-btn-primary {
	background: var(--ccm-accent, #b5451d);
	border-color: var(--ccm-accent, #b5451d);
	color: #fff;
}
#ccm-reject-all {
	background: #2f2a26;
	border-color: #2f2a26;
	color: #fff;
}
.ccm-btn-outline {
	background: transparent;
	border-color: currentColor;
}
#ccm-customize.ccm-btn-outline {
	border-width: 1px;
}

.ccm-preferences {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.ccm-preferences-inner {
	background: #fff;
	max-width: 640px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	border-radius: 18px;
	padding: 0;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.ccm-preferences-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #eee;
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 1;
}
.ccm-preferences-header h2 { margin: 0; font-size: 18px; }
.ccm-prefs-close-x {
	background: none;
	border: 1px solid #ddd;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: #888;
	padding: 0;
}
.ccm-prefs-close-x:hover { color: #333; border-color: #bbb; }

.ccm-categories-list { padding: 0 24px; }

.ccm-category-row {
	border-top: 1px solid #eee;
}
.ccm-category-row:first-of-type { border-top: none; }
.ccm-category-header {
	width: 100%;
	background: none;
	border: none;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 0;
	cursor: pointer;
	text-align: left;
	font-size: 15px;
}
.ccm-category-chevron {
	font-size: 18px;
	font-weight: 400;
	color: var(--ccm-accent, #b5451d);
	width: 16px;
	flex-shrink: 0;
	text-align: center;
	line-height: 1;
}
.ccm-category-chevron::before { content: "+"; }
.ccm-category-open .ccm-category-chevron::before { content: "\2212"; }
.ccm-category-header strong { flex: 1; }
.ccm-category-toggle-wrap { flex-shrink: 0; }

.ccm-category-desc {
	display: none;
	padding: 0 0 16px 24px;
}
.ccm-category-open .ccm-category-desc { display: block; }
.ccm-category-desc p { margin: 0; font-size: 13px; color: #555; line-height: 1.5; }

.ccm-preferences-policy-link {
	padding: 0 24px;
	margin: 4px 0 16px;
	font-size: 13px;
}
.ccm-preferences-policy-link a {
	color: var(--ccm-accent, #b5451d);
	text-decoration: underline;
}

/* Toggle switch */
.ccm-toggle {
	position: relative;
	display: inline-block;
	width: 38px;
	height: 20px;
}
.ccm-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}
.ccm-toggle-knob {
	position: absolute;
	inset: 0;
	background: #d6d1cb;
	border-radius: 4px;
	transition: background 0.15s ease;
}
.ccm-toggle-knob::before {
	content: "";
	position: absolute;
	width: 14px;
	height: 14px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 2px;
	transition: transform 0.15s ease;
}
.ccm-toggle input:checked + .ccm-toggle-knob {
	background: var(--ccm-accent, #b5451d);
}
.ccm-toggle input:checked + .ccm-toggle-knob::before {
	transform: translateX(18px);
}
.ccm-toggle-locked .ccm-toggle-knob {
	background: var(--ccm-accent, #b5451d);
	opacity: 0.55;
	cursor: not-allowed;
}
.ccm-toggle-locked .ccm-toggle-knob::before {
	transform: translateX(18px);
}

.ccm-preferences-actions {
	display: flex;
	gap: 10px;
	padding: 20px 24px;
	border-top: 1px solid #eee;
	position: sticky;
	bottom: 0;
	background: #fff;
	flex-wrap: wrap;
}
.ccm-btn-equal { flex: 1 1 auto; text-align: center; min-width: 0; }

.ccm-reopen-btn {
	background: transparent;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 6px 12px;
	cursor: pointer;
	font-size: 13px;
}

/* Svævende cookie-ikon - fast placeret, synligt på både desktop og mobil.
   Ingen baggrundsboks - kun selve cookie-billedet, med et blødt drop-shadow
   for at det stadig skiller sig ud fra sideindholdet. !important bruges
   bevidst, fordi temaets egne knap-styles (fx en grøn hover-farve) ellers
   kan sive ind, da <button> er et almindeligt HTML-element temaet også styler. */
.ccm-floating-icon {
	position: fixed;
	bottom: 20px;
	z-index: 999998;
	width: 46px;
	height: 46px;
	background: transparent !important;
	border: none !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: none !important;
	padding: 0;
}
.ccm-floating-icon img {
	width: 100%;
	height: 100%;
	display: block;
	filter: drop-shadow(0 3px 8px rgba(0,0,0,0.35));
}
.ccm-floating-icon-hover {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.15s ease;
}
.ccm-floating-icon-default {
	transition: opacity 0.15s ease;
}
.ccm-floating-icon:hover .ccm-floating-icon-hover {
	opacity: 1;
}
.ccm-floating-icon:hover .ccm-floating-icon-default {
	opacity: 0;
}
.ccm-floating-bottom-left { left: 20px; }
.ccm-floating-bottom-right { right: 20px; }

@media (max-width: 480px) {
	.ccm-floating-icon {
		width: 33px;
		height: 33px;
		bottom: 14px;
	}
	.ccm-floating-bottom-left { left: 14px; }
	.ccm-floating-bottom-right { right: 14px; }

	/* De 3 lige store knapper (banner + præference-vindue) kan ikke være
	   side om side på smalle skærme uden at blive skåret af eller klemt
	   sammen - så de stables i stedet, hver i fuld bredde. */
	.ccm-banner-actions,
	.ccm-preferences-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.ccm-banner-actions .ccm-btn,
	.ccm-preferences-actions .ccm-btn {
		width: 100%;
		white-space: normal;
	}
}

.ccm-iframe-placeholder {
	background: #f2f2f2;
	border: 1px dashed #bbb;
	border-radius: 6px;
	padding: 30px 20px;
	text-align: center;
	min-height: 200px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.ccm-iframe-placeholder p { margin: 0; color: #555; font-size: 14px; }

.ccm-cookie-overview {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
}
.ccm-cookie-overview th, .ccm-cookie-overview td {
	border: 1px solid #ddd;
	padding: 8px 10px;
	text-align: left;
	font-size: 14px;
}
.ccm-cookie-overview th { background: #f5f5f5; }

/* Admin */
.ccm-wrap .title { margin-top: 28px; }
.ccm-categories-table th, .ccm-categories-table td { padding: 10px; vertical-align: top; }
