/**
 * KVKK Çerez İzni - Ön yüz stilleri
 */

:root {
	--kvkk-bg: #ffffff;
	--kvkk-text: #1f2937;
	--kvkk-primary: #1a73e8;
	--kvkk-primary-text: #ffffff;
	--kvkk-radius: 12px;
	--kvkk-golge: 0 8px 30px rgba(0, 0, 0, 0.18);
}

/* Gizli öğeler */
#kvkk-cerez-banner[hidden],
.kvkk-cerez-modal[hidden],
.kvkk-cerez-yeniden[hidden] {
	display: none !important;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* ----------------------------------------------------------------
 * Banner
 * ---------------------------------------------------------------- */
.kvkk-cerez-banner {
	position: fixed;
	z-index: 999990;
	box-sizing: border-box;
	background: var(--kvkk-bg);
	color: var(--kvkk-text);
	box-shadow: var(--kvkk-golge);
	font-size: 15px;
	line-height: 1.55;
	animation: kvkk-belir 0.35s ease;
}

.kvkk-cerez-banner *,
.kvkk-cerez-modal * {
	box-sizing: border-box;
}

.kvkk-cerez-ic {
	display: flex;
	align-items: center;
	gap: 22px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 24px;
}

.kvkk-cerez-govde {
	flex: 1 1 auto;
	min-width: 0;
}

.kvkk-cerez-baslik {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
	color: var(--kvkk-text);
}

.kvkk-cerez-aciklama {
	margin: 0;
	color: var(--kvkk-text);
	opacity: 0.92;
}

.kvkk-cerez-aciklama p {
	margin: 0 0 6px;
}

.kvkk-cerez-baglantilar {
	margin-top: 4px !important;
	font-size: 14px;
}

.kvkk-cerez-butonlar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 0 0 auto;
	align-items: center;
}

/* Konumlar */
.kvkk-konum-alt {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
}

.kvkk-konum-ust {
	left: 0;
	right: 0;
	top: 0;
	width: 100%;
}

.kvkk-konum-sag-alt,
.kvkk-konum-sol-alt {
	bottom: 24px;
	width: 420px;
	max-width: calc(100% - 32px);
	border-radius: var(--kvkk-radius);
}

.kvkk-konum-sag-alt {
	right: 24px;
}

.kvkk-konum-sol-alt {
	left: 24px;
}

.kvkk-konum-sag-alt .kvkk-cerez-ic,
.kvkk-konum-sol-alt .kvkk-cerez-ic {
	flex-direction: column;
	align-items: stretch;
	padding: 22px;
}

.kvkk-konum-sag-alt .kvkk-cerez-butonlar,
.kvkk-konum-sol-alt .kvkk-cerez-butonlar {
	justify-content: stretch;
}

.kvkk-konum-sag-alt .kvkk-cerez-butonlar .kvkk-btn,
.kvkk-konum-sol-alt .kvkk-cerez-butonlar .kvkk-btn {
	flex: 1 1 auto;
	justify-content: center;
}

/* Ortada (modal gibi) */
.kvkk-konum-orta {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 560px;
	max-width: calc(100% - 32px);
	border-radius: var(--kvkk-radius);
}

.kvkk-konum-orta::before {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: -1;
}

.kvkk-konum-orta .kvkk-cerez-ic {
	flex-direction: column;
	align-items: stretch;
	padding: 26px;
}

/* ----------------------------------------------------------------
 * Butonlar
 * ---------------------------------------------------------------- */
.kvkk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: filter 0.15s ease, background 0.15s ease, opacity 0.15s ease;
	font-family: inherit;
}

.kvkk-btn:hover {
	filter: brightness(0.95);
}

.kvkk-btn:focus-visible {
	outline: 2px solid var(--kvkk-primary);
	outline-offset: 2px;
}

.kvkk-btn-birincil {
	background: var(--kvkk-primary);
	color: var(--kvkk-primary-text);
	border-color: var(--kvkk-primary);
}

.kvkk-btn-ikincil {
	background: transparent;
	color: var(--kvkk-text);
	border-color: currentColor;
	opacity: 0.85;
}

.kvkk-btn-ikincil:hover {
	opacity: 1;
	filter: none;
	background: rgba(127, 127, 127, 0.08);
}

/* Bağlantılar */
.kvkk-baglanti {
	color: var(--kvkk-primary);
	text-decoration: underline;
	cursor: pointer;
	font-weight: 600;
}

.kvkk-baglanti:hover {
	text-decoration: none;
}

/* ----------------------------------------------------------------
 * Modallar
 * ---------------------------------------------------------------- */
.kvkk-cerez-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.kvkk-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	animation: kvkk-belir 0.2s ease;
}

.kvkk-modal-icerik {
	position: relative;
	background: var(--kvkk-bg);
	color: var(--kvkk-text);
	width: 560px;
	max-width: 100%;
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	border-radius: var(--kvkk-radius);
	box-shadow: var(--kvkk-golge);
	animation: kvkk-yuksel 0.25s ease;
}

.kvkk-modal-genis {
	width: 760px;
}

.kvkk-modal-baslik-satir {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid rgba(127, 127, 127, 0.2);
}

.kvkk-modal-baslik-satir h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--kvkk-text);
}

.kvkk-modal-kapat {
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: var(--kvkk-text);
	opacity: 0.6;
	padding: 0 4px;
}

.kvkk-modal-kapat:hover {
	opacity: 1;
}

.kvkk-modal-govde {
	padding: 20px 24px;
	overflow-y: auto;
	color: var(--kvkk-text);
}

.kvkk-tercih-giris {
	margin-top: 0;
}

.kvkk-modal-alt {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	padding: 16px 24px;
	border-top: 1px solid rgba(127, 127, 127, 0.2);
}

/* ----------------------------------------------------------------
 * Kategoriler + switch
 * ---------------------------------------------------------------- */
.kvkk-kategori {
	padding: 16px 0;
	border-bottom: 1px solid rgba(127, 127, 127, 0.15);
}

.kvkk-kategori:last-child {
	border-bottom: none;
}

.kvkk-kategori-ust {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 6px;
}

.kvkk-kategori-ad {
	font-weight: 700;
	font-size: 15px;
	flex: 1 1 auto;
}

.kvkk-rozet {
	font-size: 12px;
	font-weight: 600;
	color: var(--kvkk-primary);
	background: rgba(26, 115, 232, 0.12);
	padding: 3px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

.kvkk-kategori-aciklama {
	font-size: 14px;
	opacity: 0.85;
	line-height: 1.5;
}

.kvkk-kategori-aciklama p {
	margin: 0;
}

/* Switch (toggle) */
.kvkk-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex: 0 0 auto;
}

.kvkk-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.kvkk-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #cbd0d8;
	border-radius: 999px;
	transition: background 0.2s ease;
}

.kvkk-slider::before {
	content: "";
	position: absolute;
	height: 20px;
	width: 20px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.kvkk-switch input:checked + .kvkk-slider {
	background: var(--kvkk-primary);
}

.kvkk-switch input:checked + .kvkk-slider::before {
	transform: translateX(20px);
}

.kvkk-switch input:focus-visible + .kvkk-slider {
	outline: 2px solid var(--kvkk-primary);
	outline-offset: 2px;
}

/* ----------------------------------------------------------------
 * Politika içeriği
 * ---------------------------------------------------------------- */
.kvkk-politika-icerik h3 {
	margin-top: 0;
}

.kvkk-politika-icerik h4 {
	margin: 18px 0 6px;
}

.kvkk-politika-icerik p,
.kvkk-politika-icerik li {
	line-height: 1.6;
}

/* ----------------------------------------------------------------
 * Yüzen buton
 * ---------------------------------------------------------------- */
.kvkk-cerez-yeniden {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 999980;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: none;
	background: var(--kvkk-primary);
	color: var(--kvkk-primary-text);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}

.kvkk-cerez-yeniden:hover {
	transform: scale(1.08);
}

/* ----------------------------------------------------------------
 * Animasyonlar
 * ---------------------------------------------------------------- */
@keyframes kvkk-belir {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes kvkk-yuksel {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------- */
@media (max-width: 782px) {
	.kvkk-cerez-ic {
		flex-direction: column;
		align-items: stretch;
		padding: 18px;
		gap: 16px;
	}

	.kvkk-cerez-butonlar {
		justify-content: stretch;
	}

	.kvkk-cerez-butonlar .kvkk-btn {
		flex: 1 1 auto;
	}

	.kvkk-konum-sag-alt,
	.kvkk-konum-sol-alt {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		max-width: none;
	}

	.kvkk-modal-alt {
		justify-content: stretch;
	}

	.kvkk-modal-alt .kvkk-btn {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kvkk-cerez-banner,
	.kvkk-modal-overlay,
	.kvkk-modal-icerik {
		animation: none;
	}
}
