/* ==========================================================================
   Zgoda na cookies - Osada Jurajska
   Samodzielny modul (prefiks .ojcc), kolory i typografia zgodne z motywem:
   tlo #140f0c / #110a06, akcent #f14814 -> hover #ffad1e, Raleway, Blenda Script
   ========================================================================== */

.ojcc,
.ojcc-fab,
.ojcc-embed {
	--ojcc-bg: #140f0c;
	--ojcc-bg-2: #1d1612;
	--ojcc-line: rgba(255, 255, 255, 0.09);
	--ojcc-text: #b9b1ab;
	--ojcc-strong: #ffffff;
	--ojcc-accent: #f14814;
	--ojcc-accent-hover: #ffad1e;
	--ojcc-light: #f5f5f5;
	--ojcc-radius: 6px;
	--ojcc-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.75), 0 2px 8px rgba(0, 0, 0, 0.4);
	font-family: "Raleway", sans-serif;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
}

.ojcc *,
.ojcc *::before,
.ojcc *::after,
.ojcc-embed * {
	box-sizing: border-box;
}

/* ---------- chmurka ---------- */

.ojcc {
	position: fixed;
	z-index: 1400; /* pod galeria PhotoSwipe (1500) */
	left: 16px;
	right: 16px;
	bottom: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	max-width: 440px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 24px 24px 20px;
	color: var(--ojcc-text);
	font-size: 14px;
	line-height: 1.6;
	text-align: left;
	background: var(--ojcc-bg);
	border: 1px solid var(--ojcc-line);
	border-top: 3px solid var(--ojcc-accent);
	border-radius: var(--ojcc-radius);
	box-shadow: var(--ojcc-shadow);
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1);
}

.ojcc[hidden] {
	display: none;
}

.ojcc.is-visible {
	opacity: 1;
	transform: none;
}

.ojcc__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: var(--ojcc-text);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: color .2s, background-color .2s;
}

.ojcc__close:hover {
	color: var(--ojcc-strong);
	background: rgba(255, 255, 255, 0.07);
}

.ojcc__close svg {
	width: 14px;
	height: 14px;
}

.ojcc__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 32px 10px 0;
}

.ojcc__icon {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	color: var(--ojcc-accent-hover);
}

.ojcc__title {
	margin: 0;
	color: var(--ojcc-strong);
	font-family: "Blenda Script", "Dancing Script", cursive;
	font-size: 26px;
	font-weight: normal;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
}

.ojcc__text {
	margin: 0;
}

.ojcc a {
	color: var(--ojcc-strong);
	text-decoration: underline;
	text-decoration-color: var(--ojcc-accent);
	text-underline-offset: 3px;
	transition: color .2s;
}

.ojcc a:hover {
	color: var(--ojcc-accent-hover);
}

/* ---------- przyciski (styl .btn motywu: kanciaste, uppercase) ---------- */

.ojcc__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 18px;
}

.ojcc__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 12px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
	border: 2px solid transparent;
	border-radius: 0;
	cursor: pointer;
	transition: color .25s, background-color .25s, border-color .25s;
}

/* "Akceptuje" i "Odrzucam" - rowna waga wizualna (wytyczne EROD 2023) */
.ojcc__btn--accept {
	color: #fff;
	background: var(--ojcc-accent);
	border-color: var(--ojcc-accent);
}

.ojcc__btn--accept:hover {
	background: var(--ojcc-accent-hover);
	border-color: var(--ojcc-accent-hover);
}

.ojcc__btn--reject {
	color: var(--ojcc-bg);
	background: var(--ojcc-light);
	border-color: var(--ojcc-light);
}

.ojcc__btn--reject:hover {
	color: #fff;
	background: transparent;
	border-color: var(--ojcc-light);
}

.ojcc__btn--ghost {
	grid-column: 1 / -1;
	min-height: 40px;
	color: var(--ojcc-strong);
	background: transparent;
	border-color: var(--ojcc-line);
}

.ojcc__btn--ghost:hover {
	border-color: var(--ojcc-accent-hover);
	color: var(--ojcc-accent-hover);
}

.ojcc__btn--ghost svg {
	width: 12px;
	height: 12px;
	margin-left: 8px;
	transition: transform .25s;
}

.ojcc__btn--ghost[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

/* ---------- ustawienia szczegolowe ---------- */

.ojcc__prefs {
	margin-top: 16px;
	padding-top: 4px;
	border-top: 1px solid var(--ojcc-line);
}

.ojcc__prefs[hidden] {
	display: none;
}

.ojcc__cat {
	padding: 14px 0;
	border-bottom: 1px solid var(--ojcc-line);
}

.ojcc__cat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ojcc__cat-name {
	margin: 0;
	color: var(--ojcc-strong);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}

.ojcc__cat-desc {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.55;
}

.ojcc__badge {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ojcc-accent-hover);
}

/* przelacznik */
.ojcc__switch {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
}

.ojcc__switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

.ojcc__track {
	position: absolute;
	inset: 0;
	background: #3a312c;
	border-radius: 26px;
	transition: background-color .25s;
}

.ojcc__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
	transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}

.ojcc__switch input:checked + .ojcc__track {
	background: var(--ojcc-accent);
}

.ojcc__switch input:checked + .ojcc__track::after {
	transform: translateX(20px);
}

.ojcc__switch input:focus-visible + .ojcc__track {
	outline: 2px solid var(--ojcc-accent-hover);
	outline-offset: 2px;
}

.ojcc__save {
	width: 100%;
	margin-top: 16px;
}

/* ---------- plywajacy przycisk ponownego otwarcia ---------- */

.ojcc-fab {
	position: fixed;
	z-index: 1390;
	left: 16px;
	bottom: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	color: var(--ojcc-accent-hover);
	background: var(--ojcc-bg);
	border: 1px solid var(--ojcc-line);
	border-radius: 50%;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
	cursor: pointer;
	opacity: .85;
	transition: opacity .2s, transform .2s, color .2s;
}

.ojcc-fab[hidden] {
	display: none;
}

.ojcc-fab:hover {
	opacity: 1;
	color: var(--ojcc-accent);
	transform: rotate(-12deg) scale(1.05);
}

.ojcc-fab svg {
	width: 22px;
	height: 22px;
}

/* ---------- fokus klawiatury (WCAG 2.2) ---------- */

.ojcc button:focus-visible,
.ojcc a:focus-visible,
.ojcc-fab:focus-visible,
.ojcc-embed button:focus-visible,
.ojcc-embed a:focus-visible {
	outline: 2px solid var(--ojcc-accent-hover);
	outline-offset: 2px;
}

/* ---------- blokada osadzonych tresci (mapa Google) ---------- */

.ojcc-embed {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 320px;
	padding: 32px 16px;
	color: var(--ojcc-text);
	font-size: 14px;
	line-height: 1.6;
	text-align: center;
	background:
		linear-gradient(rgba(17, 10, 6, 0.86), rgba(17, 10, 6, 0.86)),
		url("../img/background-2.jpg") center / cover no-repeat;
}

.ojcc-embed[hidden] {
	display: none;
}

.ojcc-embed__box {
	max-width: 440px;
}

.ojcc-embed__icon {
	width: 40px;
	height: 40px;
	margin: 0 auto 10px;
	color: var(--ojcc-accent-hover);
}

.ojcc-embed__title {
	margin: 0 0 8px;
	color: #fff;
	font-family: "Blenda Script", "Dancing Script", cursive;
	font-size: 28px;
	font-weight: normal;
	text-transform: none;
	letter-spacing: 0;
}

.ojcc-embed p {
	margin: 0 0 18px;
}

.ojcc-embed__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.ojcc-embed .ojcc__btn {
	padding-left: 20px;
	padding-right: 20px;
}

.ojcc-embed .ojcc__btn--ghost {
	text-decoration: none;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.45);
}

/* ---------- link w stopce ---------- */

.ojcc-footer-links {
	margin-top: 6px;
}

.ojcc-footer-links a,
.ojcc-footer-links button {
	padding: 0;
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color .2s;
}

.ojcc-footer-links a:hover,
.ojcc-footer-links button:hover {
	color: #ffad1e;
}

.ojcc-footer-links span {
	margin: 0 8px;
	opacity: .5;
}

/* ---------- responsywnosc ---------- */

@media (min-width: 768px) {
	.ojcc {
		left: 24px;
		right: auto;
		bottom: 24px;
		bottom: calc(24px + env(safe-area-inset-bottom, 0px));
		width: 440px;
	}

	.ojcc-fab {
		left: 24px;
		bottom: 24px;
		bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 359px) {
	.ojcc {
		padding: 20px 16px 16px;
	}

	.ojcc__actions {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ojcc,
	.ojcc *,
	.ojcc-fab {
		transition: none !important;
	}
}

@media print {
	.ojcc,
	.ojcc-fab {
		display: none !important;
	}
}
