/*
 * BuildControl Core – Cookie-Consent (Borlabs-Stil).
 * Nutzt – wenn vorhanden – die Theme-Design-Tokens (var(--bc-*)) mit Fallbacks.
 * © BuildControl Eco Health UG · Entwicklung: Tobias Krug – IT-Krug.de
 */

.bc-cc[hidden] { display: none; }

/* Abdunklung hinter dem Einstellungen-Modal */
.bc-cc__overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 30, 35, 0.55);
	z-index: 99998;
}
.bc-cc__overlay[hidden] { display: none; }

/* Banner (Karte, unten rechts) */
.bc-cc__banner {
	position: fixed;
	z-index: 99999;
	left: 1.25rem;
	right: 1.25rem;
	bottom: 1.25rem;
	background: #fff;
	color: var(--bc-ink, #1f2a2e);
	border-radius: 14px;
	border-top: 4px solid var(--bc-green, #61b344);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
	padding: 1.4rem 1.5rem;
}
.bc-cc__banner[hidden] { display: none; }
@media (min-width: 560px) {
	.bc-cc__banner { left: auto; right: 1.5rem; width: 460px; }
}

.bc-cc__h {
	margin: 0 0 0.5rem;
	font-size: 1.15rem;
	color: var(--bc-teal, #1b5e6f);
	font-family: var(--bc-font-head, inherit);
}
.bc-cc__t {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--bc-muted, #5a6b6e);
}
.bc-cc__links { margin: 0 0 1rem; font-size: 0.82rem; }
.bc-cc__links a { color: var(--bc-blue, #009ee3); }

.bc-cc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}
.bc-cc__btn {
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	border-radius: 9px;
	padding: 0.6rem 1.05rem;
	cursor: pointer;
	border: 2px solid transparent;
	line-height: 1.1;
	transition: 0.18s ease;
}
.bc-cc__btn--primary { background: var(--bc-green, #61b344); color: #fff; margin-left: auto; }
.bc-cc__btn--primary:hover { background: var(--bc-green-dark, #4f9a35); }
.bc-cc__btn--ghost { background: transparent; color: var(--bc-teal, #1b5e6f); border-color: var(--bc-border, #cdd6d4); }
.bc-cc__btn--ghost:hover { border-color: var(--bc-teal, #1b5e6f); }
.bc-cc__btn--link { background: none; border: none; color: var(--bc-muted, #5a6b6e); text-decoration: underline; padding: 0.6rem 0.4rem; }
.bc-cc__btn:focus-visible { outline: 2px solid var(--bc-blue, #009ee3); outline-offset: 2px; }

/* Einstellungen-Modal */
.bc-cc__modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}
.bc-cc__modal[hidden] { display: none; }
.bc-cc__panel {
	background: #fff;
	color: var(--bc-ink, #1f2a2e);
	width: 100%;
	max-width: 620px;
	max-height: 88vh;
	overflow: auto;
	border-radius: 16px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
	padding: 1.75rem;
}

.bc-cc__cats { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 0.85rem; }
.bc-cc__cat { border: 1px solid var(--bc-border, #e3e9e8); border-radius: 12px; padding: 0.9rem 1rem; }

/* Toggle-Schalter */
.bc-cc__switch { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--bc-teal, #1b5e6f); cursor: pointer; }
.bc-cc__switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.bc-cc__slider { width: 42px; height: 24px; border-radius: 999px; background: #c7d0ce; position: relative; flex: 0 0 auto; transition: 0.2s; }
.bc-cc__slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: 0.2s; }
.bc-cc__switch input:checked + .bc-cc__slider { background: var(--bc-green, #61b344); }
.bc-cc__switch input:checked + .bc-cc__slider::after { transform: translateX(18px); }
.bc-cc__switch input:disabled + .bc-cc__slider { background: var(--bc-teal, #1b5e6f); opacity: 0.55; }
.bc-cc__switch input:focus-visible + .bc-cc__slider { outline: 2px solid var(--bc-blue, #009ee3); outline-offset: 2px; }
.bc-cc__cat-label em { font-weight: 400; font-size: 0.8rem; color: var(--bc-muted, #5a6b6e); }
.bc-cc__cat-desc { margin: 0.5rem 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--bc-muted, #5a6b6e); }

/* „Cookie-Einstellungen"-Link (z. B. im Footer) */
.bc-cc-reopen { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

/* Immer sichtbarer „Cookie-Badge" (Borlabs-Stil) unten links:
   öffnet die Einstellungen jederzeit erneut – auch nach gespeicherter
   Auswahl (DSGVO-Widerruf muss so einfach sein wie die Einwilligung). */
.bc-cc-badge {
	position: fixed;
	left: 1.25rem;
	bottom: 1.25rem;
	z-index: 99990;
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--bc-green, #61b344);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.bc-cc-badge:hover { background: var(--bc-green-dark, #4f9a35); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.30); }
.bc-cc-badge:focus-visible { outline: 2px solid var(--bc-blue, #009ee3); outline-offset: 3px; }
.bc-cc-badge svg { display: block; width: 24px; height: 24px; }

/* Badge ausblenden, solange Banner oder Modal geöffnet ist (reines CSS, kein JS nötig). */
.bc-cc:not([hidden]) ~ .bc-cc-badge { display: none; }

@media print { .bc-cc-badge { display: none; } }
