/* ═══════════════════════════════════════════════════════════
   MAVERO — zgoda na pliki cookies
   Baner + panel ustawień + ciasteczko w lewym dolnym rogu
═══════════════════════════════════════════════════════════ */

.cc { position: relative; z-index: 2000; }
html.cc-lock, html.cc-lock body { overflow: hidden; }

/* ── Baner ──────────────────────────────────────────────── */
.cc__banner {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 2000;
	background: var(--color-white, #fff);
	border-top: 1px solid var(--color-border, rgba(0,0,0,.1));
	box-shadow: 0 -8px 40px rgba(0,0,0,.12);
	padding: var(--space-md, 20px) var(--gutter, 20px);
	padding-bottom: calc(var(--space-md, 20px) + env(safe-area-inset-bottom, 0px));
	transform: translateY(100%);
	opacity: 0;
	transition: transform .28s ease, opacity .28s ease;
}
.cc__banner.is-in { transform: translateY(0); opacity: 1; }

.cc__banner-inner {
	max-width: var(--container-max, 1280px);
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 40px);
}
.cc__banner-text { flex: 1 1 auto; min-width: 0; }
.cc__banner-text p {
	margin: 6px 0 0;
	font-size: var(--fs-sm, 14px);
	line-height: 1.65;
	color: var(--color-text-muted, #6b6b6b);
	max-width: 76ch;
}
.cc__banner-text a {
	color: var(--color-gold-text, #8A6D33);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.cc__banner-actions {
	flex: none;
	display: flex;
	align-items: center;
	gap: 10px;
}

.cc__title {
	font-family: var(--font-heading, serif);
	font-size: var(--fs-lg, 19px);
	font-weight: var(--fw-light, 300);
	margin: 0;
	color: var(--color-text, #1e1c19);
}

/* ── Przyciski ──────────────────────────────────────────── */
.cc__btn {
	font-family: inherit;
	font-size: var(--fs-xs, 12.5px);
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 13px 22px;
	border-radius: var(--radius-sm, 4px);
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: background .18s ease, border-color .18s ease, color .18s ease;
}
/* „Akceptuję” i „Tylko niezbędne” mają tę samą wagę wizualną —
   wymóg równorzędności wyboru (wytyczne EROD 03/2022). */
.cc__btn--primary {
	background: var(--color-gold, #B99A5B);
	color: var(--color-bg-dark, #1e1c19);
	border-color: var(--color-gold, #B99A5B);
}
.cc__btn--primary:hover { background: var(--color-gold-dark, #a5873f); border-color: var(--color-gold-dark, #a5873f); }
.cc__btn--secondary {
	background: transparent;
	color: var(--color-text, #1e1c19);
	border-color: rgba(0,0,0,.25);
}
.cc__btn--secondary:hover { border-color: var(--color-text, #1e1c19); background: rgba(0,0,0,.03); }
.cc__btn--link {
	background: none;
	border: 0;
	padding: 13px 8px;
	color: var(--color-text-muted, #6b6b6b);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.cc__btn--link:hover { color: var(--color-text, #1e1c19); }
.cc__btn:focus-visible,
.cc__close:focus-visible,
.cc-reopen:focus-visible { outline: 2px solid var(--color-gold, #B99A5B); outline-offset: 2px; }

/* ── Panel ustawień ─────────────────────────────────────── */
.cc__overlay {
	position: fixed;
	inset: 0;
	z-index: 2010;
	background: rgba(20,18,16,.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-md, 20px);
	opacity: 0;
	transition: opacity .22s ease;
}
.cc__overlay.is-in { opacity: 1; }

.cc__panel {
	width: min(620px, 100%);
	max-height: min(86vh, 860px);
	max-height: min(86dvh, 860px);
	display: flex;
	flex-direction: column;
	background: var(--color-white, #fff);
	border-radius: var(--radius-md, 8px);
	box-shadow: 0 24px 70px rgba(0,0,0,.28);
	transform: translateY(12px);
	transition: transform .22s ease;
}
.cc__overlay.is-in .cc__panel { transform: translateY(0); }

.cc__panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: var(--space-md, 20px) var(--space-lg, 28px);
	border-bottom: 1px solid var(--color-border, rgba(0,0,0,.1));
}
.cc__close {
	flex: none;
	width: 34px; height: 34px;
	display: inline-flex; align-items: center; justify-content: center;
	background: none;
	border: 0;
	border-radius: 50%;
	color: var(--color-text-muted, #6b6b6b);
	cursor: pointer;
	transition: background .18s ease, color .18s ease;
}
.cc__close:hover { background: rgba(0,0,0,.05); color: var(--color-text, #1e1c19); }

.cc__panel-body {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: var(--space-md, 20px) var(--space-lg, 28px);
}
.cc__intro {
	margin: 0 0 var(--space-md, 20px);
	font-size: var(--fs-sm, 14px);
	line-height: 1.7;
	color: var(--color-text-muted, #6b6b6b);
}

.cc__cat {
	padding: var(--space-md, 18px) 0;
	border-top: 1px solid var(--color-border, rgba(0,0,0,.08));
}
.cc__cat:first-of-type { border-top: 0; padding-top: 0; }
.cc__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.cc__cat-label {
	font-size: var(--fs-md, 15px);
	font-weight: var(--fw-medium, 500);
	color: var(--color-text, #1e1c19);
}
.cc__badge {
	flex: none;
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--color-text-muted, #6b6b6b);
	background: var(--color-bg-alt, #f4f1ec);
	border-radius: 100px;
	padding: 5px 11px;
}
.cc__cat-desc {
	margin: 8px 0 0;
	font-size: var(--fs-sm, 13.5px);
	line-height: 1.65;
	color: var(--color-text-muted, #6b6b6b);
}
.cc__cat-examples {
	margin: 6px 0 0;
	font-size: var(--fs-xs, 11.5px);
	color: var(--color-text-muted, #6b6b6b);
	opacity: .8;
	overflow-wrap: anywhere;
}
.cc__cat-examples code { font-size: inherit; background: none; padding: 0; }

/* Przełącznik */
.cc__switch {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	user-select: none;
}
.cc__switch.is-locked { cursor: default; }
.cc__switch input {
	position: absolute;
	width: 1px; height: 1px;
	opacity: 0;
	pointer-events: none;
}
.cc__switch-track {
	flex: none;
	position: relative;
	width: 44px; height: 25px;
	background: #cfcbc4;
	border-radius: 100px;
	transition: background .2s ease;
}
.cc__switch-thumb {
	position: absolute;
	top: 3px; left: 3px;
	width: 19px; height: 19px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
	transition: transform .2s ease;
}
.cc__switch input:checked + .cc__switch-track { background: var(--color-gold, #B99A5B); }
.cc__switch input:checked + .cc__switch-track .cc__switch-thumb { transform: translateX(19px); }
.cc__switch.is-locked .cc__switch-track { background: #bdb8b0; opacity: .75; }
.cc__switch input:focus-visible + .cc__switch-track { outline: 2px solid var(--color-gold, #B99A5B); outline-offset: 2px; }

.cc__panel-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	padding: var(--space-md, 20px) var(--space-lg, 28px);
	padding-bottom: calc(var(--space-md, 20px) + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--color-border, rgba(0,0,0,.1));
	background: var(--color-bg, #FAF8F5);
	border-radius: 0 0 var(--radius-md, 8px) var(--radius-md, 8px);
}

/* ── Ciasteczko w lewym dolnym rogu ─────────────────────── */
.cc-reopen {
	position: fixed;
	left: 18px;
	bottom: 18px;
	bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	z-index: 1150;
	display: inline-flex;
	align-items: center;
	gap: 0;
	height: 46px;
	padding: 0 12px;
	background: var(--color-white, #fff);
	color: var(--color-text, #1e1c19);
	border: 1px solid var(--color-border, rgba(0,0,0,.12));
	border-radius: 100px;
	box-shadow: 0 6px 24px rgba(0,0,0,.14);
	cursor: pointer;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .3s ease, transform .3s ease, box-shadow .2s ease, gap .25s ease, padding .25s ease;
}
.cc-reopen.is-in { opacity: 1; transform: translateY(0); }
.cc-reopen:hover {
	box-shadow: 0 10px 30px rgba(0,0,0,.2);
	gap: 9px;
	padding-right: 18px;
}
.cc-reopen svg { flex: none; color: var(--color-gold-text, #8A6D33); }

/* Podpis rozwija się dopiero po najechaniu — w spoczynku samo ciasteczko */
.cc-reopen__tip {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	font-size: var(--fs-xs, 12px);
	letter-spacing: .04em;
	transition: max-width .25s ease;
}
.cc-reopen:hover .cc-reopen__tip,
.cc-reopen:focus-visible .cc-reopen__tip { max-width: 160px; }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 860px) {
	.cc__banner-inner { flex-direction: column; align-items: stretch; gap: 16px; }
	.cc__banner-actions { flex-wrap: wrap; }
	.cc__btn--primary,
	.cc__btn--secondary { flex: 1 1 auto; text-align: center; }
	.cc__btn--link { flex: 1 1 100%; text-align: center; }
	.cc__panel-foot .cc__btn { flex: 1 1 auto; }
}
@media (max-width: 768px) {
	/* Nad sticky paskiem koszyka na karcie produktu */
	body.single-product .cc-reopen { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
	.cc-reopen { left: 14px; }
}

/* Panel ustawień i baner nie mogą przykrywać konfiguratora (z-index 1200) —
   ciasteczko chowamy, gdy konfigurator jest otwarty. */
html.mconf-lock .cc-reopen { display: none; }

@media (prefers-reduced-motion: reduce) {
	.cc__banner, .cc__overlay, .cc__panel, .cc-reopen, .cc__switch-thumb,
	.cc__switch-track, .cc-reopen__tip { transition: none; }
}
