/*
 * KVKK çerez izni: alttaki bant, tercih penceresi ve izin bekleyen gömülü içeriklerin kapağı.
 * İşaretleme: _includes/cerez.njk ve eleventy.config.js > izin-gomu; davranış: assets/js/cerez.js
 */

/* site.css'teki genel p kuralı (Open Sans Condensed 300, 20px/21px) burada geçmesin; yazı tipi kapsayıcıdan gelir */
.cerez :where(p) {
	font: inherit;
}

/* ---------- Düğmeler ---------- */
.cerez-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 9px 20px;
	border: 1px solid var(--lx-gold);
	border-radius: 999px;
	background: transparent;
	color: var(--lx-gold);
	font-family: "Jost", "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.cerez-btn:hover {
	background: var(--lx-gold-wash);
}
.cerez-btn--ana {
	background: var(--lx-gold);
	color: var(--lx-surface);
}
.cerez-btn--ana:hover {
	background: var(--lx-heading);
	border-color: var(--lx-heading);
	color: var(--lx-surface);
}
.cerez-btn--yalin {
	border-color: transparent;
	color: var(--lx-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.cerez-btn--yalin:hover {
	background: none;
	color: var(--lx-gold);
}
.cerez-btn:focus-visible,
.cerez-ayar__kapat:focus-visible,
.site-footer__legal button:focus-visible {
	outline: 2px solid var(--lx-gold);
	outline-offset: 3px;
}

/* ---------- Bant ---------- */
.cerez-bant {
	position: fixed;
	right: 16px;
	bottom: 16px;
	left: 16px;
	z-index: 1500;
	display: flex;
	align-items: center;
	gap: 18px 32px;
	max-width: 1120px;
	margin: 0 auto;
	padding: 20px 24px;
	border: 1px solid var(--lx-line-strong);
	border-radius: 16px;
	background: var(--lx-panel-bg);
	color: var(--lx-text);
	box-shadow: var(--lx-shadow);
	font-family: "Open Sans", sans-serif;
	font-size: 14.5px;
	font-weight: 400;
	line-height: 1.6;
}
.cerez-bant[hidden] {
	display: none;
}
.cerez-bant__metin {
	flex: 1;
	min-width: 0;
}
.cerez-bant__baslik {
	margin: 0 0 4px;
	color: var(--lx-heading);
	font-family: var(--lx-serif);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}
.cerez-bant p {
	margin: 0;
	color: var(--lx-body);
}
.cerez-bant a,
.cerez-ayar a {
	color: var(--lx-gold);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.cerez-bant__eylem {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}
@media (max-width: 991px) {
	.cerez-bant {
		flex-direction: column;
		align-items: stretch;
	}
	.cerez-bant__eylem .cerez-btn--ana {
		flex: 1 1 140px;
	}
}
@media (max-width: 575px) {
	.cerez-bant {
		right: 8px;
		bottom: 8px;
		left: 8px;
		padding: 16px;
		font-size: 14px;
	}
	.cerez-bant__eylem .cerez-btn--yalin {
		flex: 1 1 100%;
	}
}

/* ---------- Tercih penceresi ---------- */
.cerez-ayar {
	width: calc(100% - 32px);
	max-width: 580px;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	overflow: auto;
	border: 1px solid var(--lx-line-strong);
	border-radius: 16px;
	background: var(--lx-surface);
	color: var(--lx-text);
	box-shadow: var(--lx-shadow);
	font-family: "Open Sans", sans-serif;
	font-size: 14.5px;
	font-weight: 400;
	line-height: 1.6;
	overscroll-behavior: contain;
}
.cerez-ayar::backdrop {
	background: rgba(20, 14, 8, 0.55);
}
.cerez-ayar__ic {
	position: relative;
	padding: 28px 28px 24px;
}
.cerez-ayar__baslik {
	margin: 0 40px 8px 0;
	color: var(--lx-heading);
	font-family: var(--lx-serif);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
}
.cerez-ayar__giris {
	margin: 0 0 18px;
	color: var(--lx-body);
}
.cerez-ayar__liste {
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}
.cerez-kat {
	margin: 0;
	padding: 14px 0;
	line-height: 1.55;
	border-top: 1px solid var(--lx-line);
}
.cerez-kat:last-child {
	border-bottom: 1px solid var(--lx-line);
}
.cerez-kat__ust {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 4px;
	font-weight: 400;
}
label.cerez-kat__ust {
	cursor: pointer;
}
.cerez-kat__ad {
	color: var(--lx-heading);
	font-family: "Jost", "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	font-weight: 500;
}
.cerez-kat__hep {
	color: var(--lx-gold);
	font-size: 13px;
	font-weight: 600;
}
.cerez-kat__metin {
	margin: 0;
	color: var(--lx-muted);
	font-size: 14px;
}
/* Anahtar: gerçek onay kutusu görünmez ama yerinde (klavye, ekran okuyucu ve dokunma için) */
.cerez-kat__kutu {
	position: absolute;
	top: 50%;
	right: 0;
	width: 42px;
	height: 24px;
	margin: -12px 0 0;
	opacity: 0;
	cursor: pointer;
}
.cerez-kat__anahtar {
	position: relative;
	flex: none;
	width: 42px;
	height: 24px;
	border-radius: 12px;
	background: var(--lx-line-strong);
	transition: background-color 0.25s ease;
	pointer-events: none;
}
.cerez-kat__anahtar::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cerez-kat__kutu:checked + .cerez-kat__anahtar {
	background: var(--lx-gold);
}
.cerez-kat__kutu:checked + .cerez-kat__anahtar::after {
	transform: translateX(18px);
}
.cerez-kat__kutu:focus-visible + .cerez-kat__anahtar {
	outline: 2px solid var(--lx-gold);
	outline-offset: 3px;
}
.cerez-ayar__eylem {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.cerez-ayar__eylem .cerez-btn {
	flex: 1 1 150px;
}
.cerez-ayar__kapat {
	position: absolute;
	top: 18px;
	right: 18px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--lx-line);
	border-radius: 50%;
	background: transparent;
	color: var(--lx-text);
	cursor: pointer;
}
.cerez-ayar__kapat svg {
	width: 18px;
	height: 18px;
}
.cerez-ayar__kapat:hover {
	border-color: var(--lx-gold);
	color: var(--lx-gold);
}
@media (max-width: 575px) {
	.cerez-ayar__ic {
		padding: 22px 18px 18px;
	}
	.cerez-ayar__baslik {
		font-size: 21px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.cerez-btn,
	.cerez-kat__anahtar,
	.cerez-kat__anahtar::after {
		transition: none;
	}
}

/* ---------- İzin bekleyen gömülü içerik (Google Haritalar, YouTube, OpenStreetMap) ---------- */
.izin-gomu {
	position: relative;
	display: block;
	isolation: isolate;
}
.izin-gomu > iframe {
	display: block;
	max-width: 100%;
}
/* Yüklenmemiş iframe'in boş (beyaz) yüzü kapağın yuvarlak köşelerinden görünmesin */
.izin-gomu:not(.is-acik) > iframe {
	visibility: hidden;
}
.izin-gomu__kapak {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 20px;
	overflow: auto;
	border: 1px dashed var(--lx-line-strong);
	border-radius: 14px;
	background: var(--lx-surface-2);
	color: var(--lx-text);
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.55;
	text-align: center;
}
.izin-gomu.is-acik > .izin-gomu__kapak {
	display: none;
}
.izin-gomu__ad {
	display: block;
	color: var(--lx-gold);
	font-family: "Jost", "Helvetica Neue", Arial, sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.izin-gomu__metin {
	display: block;
	max-width: 46ch;
	color: var(--lx-body);
}
.izin-gomu__eylem {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
.izin-gomu__eylem .cerez-btn {
	min-height: 40px;
	padding: 7px 16px;
	font-size: 14px;
}
.izin-gomu__dis {
	display: block;
	color: var(--lx-muted);
	font-size: 13px;
}
.izin-gomu__dis a {
	color: var(--lx-gold);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Footer: Çerez Politikası ve Çerez ayarları ---------- */
.site-footer__legal {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 18px;
	margin: 0;
	font-size: 13px;
}
.site-footer__legal a,
.site-footer__legal button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--lx-muted);
	font: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s ease;
}
.site-footer__legal a:hover,
.site-footer__legal button:hover {
	color: var(--lx-gold);
	text-decoration: underline;
	text-underline-offset: 3px;
}
