/*
 * Budotech Cookie Consent - banner.css
 * Paleta: biel + #15619d (primary motywu Budotech).
 * Wszystkie reguły scope'owane do .bcc-* aby nie kolidować z motywem.
 */

:root {
	--bcc-primary: #15619d;
	--bcc-primary-hover: #0f4d80;
	--bcc-text: #262b32;
	--bcc-text-muted: #60697b;
	--bcc-bg: #ffffff;
	--bcc-border: #e6ecf2;
	--bcc-border-strong: #c8d4e0;
	--bcc-foot-bg: #f6f8fb;
	--bcc-shadow-lg: 0 12px 40px rgba(21, 97, 157, 0.18), 0 2px 8px rgba(21, 97, 157, 0.08);
	--bcc-shadow-md: 0 6px 20px rgba(21, 97, 157, 0.25);
	--bcc-radius: 14px;
	--bcc-font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#bcc-root {
	position: fixed;
	z-index: 99990;
	inset: 0;
	pointer-events: none;
}

#bcc-root > * {
	pointer-events: auto;
}

/* ---------- Banner ---------- */
.bcc-banner {
	position: fixed;
	left: 16px;
	bottom: 16px;
	width: min(440px, calc(100vw - 32px));
	background: var(--bcc-bg);
	color: var(--bcc-text);
	border-radius: var(--bcc-radius);
	border: 1px solid var(--bcc-border);
	box-shadow: var(--bcc-shadow-lg);
	padding: 18px 18px 16px;
	font-family: var(--bcc-font);
	font-size: 14px;
	line-height: 1.55;
	transform: translateY(20px);
	opacity: 0;
	animation: bcc-slide-in 0.35s ease forwards;
}

@keyframes bcc-slide-in {
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.bcc-banner__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.bcc-banner__icon {
	display: inline-flex;
	color: var(--bcc-primary);
}

.bcc-banner__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--bcc-text);
	font-family: var(--bcc-font);
}

.bcc-banner__text {
	margin: 0 0 10px;
	color: var(--bcc-text-muted);
}

.bcc-banner__links {
	margin: 0 0 14px;
	font-size: 12.5px;
}

.bcc-banner__links a {
	color: var(--bcc-primary);
	text-decoration: underline;
}

.bcc-banner__links a:hover {
	color: var(--bcc-primary-hover);
}

.bcc-banner__actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	align-items: center;
}

/* W banerze (1 rząd) wszystkie buttony są kompaktowe i bez zawijania. */
.bcc-banner__actions .bcc-btn {
	padding: 9px 14px;
	font-size: 13px;
	white-space: nowrap;
	flex: 0 0 auto;
}

/* RODO / EDPB 03/2022: Akceptuj i Odrzuć MUSZĄ mieć równą wizualną prominencję,
 * aby uniknąć "deceptive design pattern". W banerze nadpisujemy primary tak,
 * by wyglądał identycznie jak ghost - oba jako outline w kolorze brand. */
.bcc-banner__actions .bcc-btn--primary {
	background: transparent;
	color: var(--bcc-primary);
	border: 1px solid var(--bcc-border-strong);
	box-shadow: none;
}

.bcc-banner__actions .bcc-btn--primary:hover {
	background: var(--bcc-foot-bg);
	border-color: var(--bcc-primary);
	color: var(--bcc-primary-hover);
	box-shadow: none;
}

/* Link "Ustawienia" - osobna kategoria akcji (otwiera modal, nie jest finalną zgodą).
 * Stylizowany jako tekst-link po lewej stronie, pchnie pozostałe w prawo. */
.bcc-banner__actions .bcc-btn--link {
	padding: 9px 4px;
	font-size: 12.5px;
	margin-right: auto;
}

/* ---------- Buttons ---------- */
.bcc-btn {
	appearance: none;
	border: 0;
	font: inherit;
	font-family: var(--bcc-font);
	font-weight: 700;
	cursor: pointer;
	border-radius: 8px;
	padding: 9px 18px;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	line-height: 1.2;
}

.bcc-btn--primary {
	background: var(--bcc-primary);
	color: #fff;
	box-shadow: 0 4px 12px rgba(21, 97, 157, 0.25);
}

.bcc-btn--primary:hover {
	background: var(--bcc-primary-hover);
	color: #fff;
	box-shadow: 0 6px 18px rgba(21, 97, 157, 0.35);
}

.bcc-btn--ghost {
	background: transparent;
	color: var(--bcc-primary);
	border: 1px solid var(--bcc-border-strong);
}

.bcc-btn--ghost:hover {
	background: var(--bcc-foot-bg);
	border-color: var(--bcc-primary);
	color: var(--bcc-primary-hover);
}

.bcc-btn--link {
	background: transparent;
	color: var(--bcc-text-muted);
	padding: 9px 4px;
	text-decoration: underline;
}

.bcc-btn--link:hover {
	color: var(--bcc-primary);
}

/* ---------- Modal ---------- */
.bcc-modal {
	position: fixed;
	inset: 0;
	z-index: 99991;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.bcc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(38, 43, 50, 0.55);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: bcc-fade 0.2s ease;
}

@keyframes bcc-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.bcc-modal__dialog {
	position: relative;
	background: var(--bcc-bg);
	color: var(--bcc-text);
	border-radius: var(--bcc-radius);
	width: min(520px, 100%);
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(38, 43, 50, 0.3);
	font-family: var(--bcc-font);
	font-size: 14px;
	overflow: hidden;
	animation: bcc-pop 0.25s ease;
}

@keyframes bcc-pop {
	from { transform: translateY(10px) scale(0.98); opacity: 0; }
	to { transform: translateY(0) scale(1); opacity: 1; }
}

.bcc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--bcc-border);
	background: var(--bcc-bg);
}

.bcc-modal__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--bcc-text);
	font-family: var(--bcc-font);
}

.bcc-modal__close {
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 4px;
	color: var(--bcc-text-muted);
	border-radius: 6px;
	display: inline-flex;
	transition: background 0.15s ease, color 0.15s ease;
}

.bcc-modal__close:hover {
	background: var(--bcc-foot-bg);
	color: var(--bcc-primary);
}

.bcc-modal__body {
	padding: 8px 20px 16px;
	overflow-y: auto;
	background: var(--bcc-bg);
}

.bcc-modal__foot {
	padding: 14px 20px;
	border-top: 1px solid var(--bcc-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	background: var(--bcc-foot-bg);
	flex-wrap: wrap;
}

.bcc-modal__privacy {
	color: var(--bcc-primary);
	text-decoration: underline;
	font-size: 13px;
	font-weight: 500;
}

.bcc-modal__privacy:hover {
	color: var(--bcc-primary-hover);
}

.bcc-modal__foot-actions {
	display: flex;
	gap: 8px;
	margin-left: auto;
}

/* ---------- Categories ---------- */
.bcc-cat {
	padding: 14px 0;
	border-bottom: 1px solid var(--bcc-border);
}

.bcc-cat:last-child {
	border-bottom: 0;
}

.bcc-cat__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}

.bcc-cat__label {
	font-weight: 700;
	color: var(--bcc-text);
}

.bcc-cat__desc {
	margin: 6px 0 0;
	color: var(--bcc-text-muted);
	font-size: 13px;
	line-height: 1.5;
}

/* ---------- Toggle switch ---------- */
.bcc-toggle {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex-shrink: 0;
}

.bcc-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.bcc-toggle__slider {
	position: absolute;
	inset: 0;
	background: var(--bcc-border-strong);
	border-radius: 999px;
	transition: background 0.2s ease;
}

.bcc-toggle__slider::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	top: 3px;
	left: 3px;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(38, 43, 50, 0.25);
}

.bcc-toggle input:checked + .bcc-toggle__slider {
	background: var(--bcc-primary);
}

.bcc-toggle input:checked + .bcc-toggle__slider::before {
	transform: translateX(18px);
}

.bcc-toggle--locked .bcc-toggle__slider {
	background: var(--bcc-primary);
	opacity: 0.55;
	cursor: not-allowed;
}

.bcc-toggle--locked .bcc-toggle__slider::before {
	transform: translateX(18px);
}

/* ---------- Floating button ---------- */
.bcc-floating {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 99989;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--bcc-primary);
	color: #fff;
	border: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--bcc-shadow-md);
	transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bcc-floating:hover {
	background: var(--bcc-primary-hover);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(21, 97, 157, 0.4);
}

.bcc-trigger {
	cursor: pointer;
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
	.bcc-banner {
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
	}
	.bcc-banner__actions {
		flex-direction: column;
		align-items: stretch;
	}
	.bcc-btn {
		width: 100%;
		text-align: center;
	}
	.bcc-floating {
		left: 12px;
		bottom: 12px;
	}
	.bcc-modal__foot {
		flex-direction: column;
		align-items: stretch;
	}
	.bcc-modal__privacy {
		text-align: center;
	}
	.bcc-modal__foot-actions {
		margin-left: 0;
	}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.bcc-banner,
	.bcc-modal__backdrop,
	.bcc-modal__dialog {
		animation: none;
	}
}
