/**
 * Profgrup Çerez Onayı — ön yüz stilleri.
 * Renkler PHP tarafından --pgc-ana / --pgc-metin / --pgc-bg değişkenleriyle gelir.
 */

:root {
	--pgc-ana: #0d4d92;
	--pgc-metin: #1f2d3d;
	--pgc-bg: #ffffff;
	--pgc-golge: 0 8px 30px rgba(13, 40, 70, 0.18);
	--pgc-kenar: #e3e8ef;
	--pgc-radius: 14px;
}

#pgc-banner,
#pgc-modal,
.pgc-yeniden-ac {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.5;
}

#pgc-banner *,
#pgc-modal * {
	box-sizing: border-box;
}

/* hidden özelliği her zaman gizlesin — .pgc-modal'ın display:flex'i ezmesin.
   Aksi halde gizli modal örtüsü tüm ekranı kaplayıp tıklamaları yutar. */
.pgc-banner[hidden],
.pgc-modal[hidden],
.pgc-yeniden-ac[hidden] {
	display: none !important;
}

/* ---------- Banner ---------- */

.pgc-banner {
	position: fixed;
	z-index: 999999;
	background: var(--pgc-bg);
	color: var(--pgc-metin);
	box-shadow: var(--pgc-golge);
	border: 1px solid var(--pgc-kenar);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.pgc-banner.pgc-acik {
	opacity: 1;
	transform: translateY(0);
}

/* Köşe kartı (sağ-alt / sol-alt) */
.pgc-konum-sag-alt,
.pgc-konum-sol-alt {
	bottom: 24px;
	width: 420px;
	max-width: calc(100vw - 32px);
	border-radius: var(--pgc-radius);
}

.pgc-konum-sag-alt { right: 24px; }
.pgc-konum-sol-alt { left: 24px; }

/* Tam genişlik alt bar */
.pgc-konum-tam-bar {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	border-left: none;
	border-right: none;
	border-bottom: none;
	border-radius: 0;
}

.pgc-banner-ic {
	padding: 22px 24px;
}

.pgc-konum-tam-bar .pgc-banner-ic {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 28px;
}

.pgc-konum-tam-bar .pgc-banner-metin { flex: 1; }

.pgc-baslik {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
	color: var(--pgc-metin);
}

.pgc-aciklama {
	margin: 0;
	font-size: 14px;
	color: var(--pgc-metin);
	opacity: 0.9;
}

.pgc-politika-link {
	color: var(--pgc-ana);
	text-decoration: underline;
	font-weight: 600;
	white-space: nowrap;
}

.pgc-banner-butonlar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.pgc-konum-tam-bar .pgc-banner-butonlar {
	margin-top: 0;
	flex-shrink: 0;
}

/* ---------- Butonlar ----------
   ID ile özelleştirilip !important ile sağlamlaştırıldı; böylece tema
   (Elementor/JKit vb.) genel buton stilleri bunları ezemez. */

#pgc-banner .pgc-btn,
#pgc-modal .pgc-btn {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: inline-block;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	min-height: 0 !important;
	height: auto !important;
	margin: 0;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	padding: 11px 18px !important;
	border: 1px solid transparent !important;
	border-radius: 9px !important;
	background-image: none !important;
	box-shadow: none !important;
	transition: none !important;
	transform: none !important;
}

#pgc-banner .pgc-btn-birincil,
#pgc-modal .pgc-btn-birincil {
	background: var(--pgc-ana) !important;
	color: #fff !important;
}
#pgc-banner .pgc-btn-birincil:hover,
#pgc-modal .pgc-btn-birincil:hover {
	filter: brightness(1.08);
}

#pgc-banner .pgc-btn-ikincil,
#pgc-modal .pgc-btn-ikincil {
	background: rgba(13, 77, 146, 0.08) !important;
	color: var(--pgc-ana) !important;
}
#pgc-banner .pgc-btn-ikincil:hover,
#pgc-modal .pgc-btn-ikincil:hover {
	background: rgba(13, 77, 146, 0.15) !important;
}

#pgc-banner .pgc-btn-cizgi,
#pgc-modal .pgc-btn-cizgi {
	background: transparent !important;
	color: var(--pgc-metin) !important;
	border-color: var(--pgc-kenar) !important;
}
#pgc-banner .pgc-btn-cizgi:hover,
#pgc-modal .pgc-btn-cizgi:hover {
	border-color: var(--pgc-ana) !important;
	color: var(--pgc-ana) !important;
}

/* ---------- Modal ---------- */

.pgc-modal {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.pgc-modal.pgc-acik { opacity: 1; }

.pgc-modal-ortusu {
	position: absolute;
	inset: 0;
	background: rgba(15, 30, 50, 0.55);
	backdrop-filter: blur(2px);
}

.pgc-modal-kutu {
	position: relative;
	background: var(--pgc-bg);
	color: var(--pgc-metin);
	width: 560px;
	max-width: 100%;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	border-radius: var(--pgc-radius);
	box-shadow: var(--pgc-golge);
	overflow: hidden;
	transform: translateY(12px);
	transition: transform 0.25s ease;
}

.pgc-modal.pgc-acik .pgc-modal-kutu { transform: translateY(0); }

.pgc-modal-bas {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--pgc-kenar);
}

.pgc-modal-bas h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--pgc-metin);
}

#pgc-modal .pgc-kapat {
	-webkit-appearance: none !important;
	appearance: none !important;
	background: none !important;
	background-image: none !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	width: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	padding: 0 4px !important;
	margin: 0 !important;
	font-size: 28px !important;
	line-height: 1 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer;
	color: var(--pgc-metin);
	opacity: 0.55;
}
#pgc-modal .pgc-kapat:hover { opacity: 1; }

.pgc-modal-govde {
	padding: 20px 24px;
	overflow-y: auto;
}

.pgc-modal-giris {
	margin: 0 0 18px;
	font-size: 14px;
	opacity: 0.9;
}

.pgc-kategori {
	padding: 16px 0;
	border-bottom: 1px solid var(--pgc-kenar);
}
.pgc-kategori:last-child { border-bottom: none; }

.pgc-kategori-bas {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.pgc-kategori-ad {
	font-size: 15px;
	font-weight: 700;
	color: var(--pgc-metin);
}

.pgc-kategori-aciklama {
	margin: 8px 0 0;
	font-size: 13px;
	opacity: 0.78;
}

.pgc-her-zaman {
	font-size: 12px;
	font-weight: 600;
	color: var(--pgc-ana);
}

/* ---------- Switch ---------- */

.pgc-switch {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	position: relative;
}

.pgc-switch input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.pgc-slider {
	width: 44px;
	height: 24px;
	background: #c7cfda;
	border-radius: 999px;
	position: relative;
	transition: background 0.2s ease;
	flex-shrink: 0;
}

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

.pgc-switch input:checked + .pgc-slider {
	background: var(--pgc-ana);
}

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

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

.pgc-switch-kilitli .pgc-slider {
	opacity: 0.65;
	cursor: not-allowed;
}

.pgc-modal-alt {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	padding: 18px 24px;
	border-top: 1px solid var(--pgc-kenar);
}

/* ---------- Yeniden aç butonu ---------- */

/* Tema-korumalı: kendi ID'si + !important ile tema buton stillerini ezer. */
#pgc-yeniden-ac {
	position: fixed !important;
	left: 20px !important;
	right: auto !important;
	bottom: 20px !important;
	top: auto !important;
	z-index: 999998 !important;
	width: 46px !important;
	height: 46px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	border: 1px solid var(--pgc-kenar) !important;
	background: var(--pgc-bg) !important;
	background-image: none !important;
	color: var(--pgc-ana) !important;
	cursor: pointer;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: 0 4px 14px rgba(13, 40, 70, 0.18) !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	text-transform: none !important;
	line-height: 1 !important;
	transition: none !important;
	transform: none !important;
}

#pgc-yeniden-ac:hover {
	box-shadow: 0 6px 20px rgba(13, 40, 70, 0.28) !important;
}

#pgc-yeniden-ac svg {
	width: 22px !important;
	height: 22px !important;
	display: block !important;
}

body.pgc-modal-acik {
	overflow: hidden;
}

/* ---------- Mobil ---------- */

@media (max-width: 600px) {
	.pgc-konum-sag-alt,
	.pgc-konum-sol-alt {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		max-width: none;
	}

	.pgc-konum-tam-bar .pgc-banner-ic {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.pgc-banner-butonlar {
		flex-direction: column;
	}

	.pgc-banner-butonlar .pgc-btn {
		width: 100%;
	}

	.pgc-modal-alt {
		flex-direction: column-reverse;
	}

	.pgc-modal-alt .pgc-btn {
		width: 100%;
	}

	.pgc-yeniden-ac {
		left: 12px;
		bottom: 12px;
	}
}
