/* ==========================================================================
   Tropikal Türkiye – çerez onayı (porto-child 1.10.0; İşlevsel 1.10.1) · HTML: inc/tt-cerez.php · JS: js/tt-cerez.js
   Renkler marka rehberinden (style.css :root): düğme logo yeşili #3A5A19 üzerinde beyaz (7.6:1),
   metin #2C2230, ikincil metin #5F6352 (6.1:1), zemin beyaz / krem #FAF7EC.
   "Reddet" ve "Kabul Et" aynı biçimde (eşit görünürlük); "Tercihleri Yönet" çerçeveli.
   ========================================================================== */

.tt-cerez[hidden], .tt-cerez-pencere[hidden] { display: none !important; }
body.tt-cerez-acik { padding-bottom: var(--tt-cerez-bosluk, 0px) !important; }
html.tt-cerez-kilit, html.tt-cerez-kilit body { overflow: hidden; }

.tt-cerez, .tt-cerez-pencere {
	font-family: var(--tt-font-govde);
	color: var(--tt-hass-mor-siyah, #2C2230);
	-webkit-font-smoothing: antialiased;
}
.tt-cerez *, .tt-cerez-pencere * { box-sizing: border-box; }
.tt-cerez a, .tt-cerez-pencere a { color: var(--tt-logo-yesili, #3A5A19); text-decoration: underline; text-underline-offset: 2px; }
.tt-cerez a:hover, .tt-cerez-pencere a:hover { color: var(--tt-avokado-kabugu, #26391F); }
/* Porto "body a{outline:none!important}" odak çerçevesini kaldırıyor; burada geri gelir. */
.tt-cerez a:focus-visible, .tt-cerez-pencere a:focus-visible,
.tt-cerez button:focus-visible, .tt-cerez-pencere button:focus-visible,
.tt-cerez-pencere summary:focus-visible { outline: 3px solid var(--tt-papaya, #E2792C) !important; outline-offset: 2px; border-radius: 4px; }

/* --- Bildirim bandı --- */
.tt-cerez {
	position: fixed;
	z-index: 1040;
	left: 16px;
	bottom: calc(16px + var(--tt-cerez-alt, 0px));
	width: min(440px, calc(100vw - 32px));
	background: #fff;
	border: 1px solid #e3ddc8;
	border-top: 4px solid var(--tt-logo-yesili, #3A5A19);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(38, 57, 31, .18);
}
.tt-cerez-ic { padding: 16px 18px 18px; }
.tt-cerez .tt-cerez-baslik { margin: 0 0 4px; font-family: var(--tt-font-baslik); font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--tt-avokado-kabugu, #26391F); }
.tt-cerez .tt-cerez-metin { margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--tt-hass-mor-siyah, #2C2230); }
.tt-cerez .tt-cerez-yeni { margin-top: -6px; padding: 8px 10px; border-radius: 6px; background: var(--tt-krem-zemin, #FAF7EC); font-size: 13.5px; }
.tt-cerez .tt-cerez-yeni[hidden], .tt-cerez-p-uyari[hidden] { display: none !important; }
.tt-cerez-dugmeler { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tt-cerez-dugmeler .tt-cerez-btn--ikincil { grid-column: 1 / -1; }

/* Düğmeler */
.tt-cerez-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 8px 16px; margin: 0;
	border-radius: 6px; border: 2px solid var(--tt-logo-yesili, #3A5A19);
	font-family: var(--tt-font-govde); font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: 0; text-transform: none;
	cursor: pointer; transition: background-color .15s ease, color .15s ease;
	box-shadow: none;
}
.tt-cerez-btn--ana { background: var(--tt-logo-yesili, #3A5A19); color: #fff; }
.tt-cerez-btn--ana:hover { background: var(--tt-avokado-kabugu, #26391F); border-color: var(--tt-avokado-kabugu, #26391F); color: #fff; }
.tt-cerez-btn--ikincil { background: #fff; color: var(--tt-logo-yesili, #3A5A19); }
.tt-cerez-btn--ikincil:hover { background: var(--tt-krem-zemin, #FAF7EC); color: var(--tt-avokado-kabugu, #26391F); }

/* --- Tercih penceresi --- */
.tt-cerez-pencere {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	background: rgba(28, 43, 23, .55);
}
.tt-cerez-p-kutu {
	display: flex; flex-direction: column;
	width: min(620px, 100%); max-height: min(88vh, 760px);
	background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
	outline: none;
}
.tt-cerez-p-ust { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #ece7d6; }
.tt-cerez-pencere .tt-cerez-p-baslik { margin: 0; font-family: var(--tt-font-baslik); font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--tt-avokado-kabugu, #26391F); }
.tt-cerez-kapat { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -6px -10px -6px 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--tt-hass-mor-siyah, #2C2230); cursor: pointer; }
.tt-cerez-kapat:hover { background: var(--tt-krem-zemin, #FAF7EC); }
.tt-cerez-p-govde { flex: 1 1 auto; overflow-y: auto; padding: 16px 20px; -webkit-overflow-scrolling: touch; }
.tt-cerez-p-govde > p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; }
/* İstek listesi için izin isteği (misafir, İşlevsel kapalı) */
.tt-cerez-pencere .tt-cerez-p-uyari { margin: 8px 0 0; font-size: 14px; line-height: 1.5; padding: 10px 12px; border-left: 4px solid var(--tt-papaya, #E2792C); border-radius: 6px; background: #FDF1E7; color: var(--tt-hass-mor-siyah, #2C2230); }
.tt-cerez-kat { padding: 14px 0; border-top: 1px solid #ece7d6; }
.tt-cerez-kat-ust { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tt-cerez-pencere .tt-cerez-kat-ad { margin: 0; font-family: var(--tt-font-baslik); font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--tt-hass-mor-siyah, #2C2230); }
.tt-cerez-pencere .tt-cerez-kat-acik { margin: 6px 0 8px; font-size: 14px; line-height: 1.55; color: var(--tt-zeytin-grisi, #5F6352); }
.tt-cerez-her-zaman { font-size: 13px; font-weight: 700; color: var(--tt-logo-yesili, #3A5A19); white-space: nowrap; }

/* Anahtar (checkbox role=switch) */
.tt-cerez-anahtar { position: relative; display: inline-flex; flex: none; width: 52px; height: 30px; margin: 0; cursor: pointer; }
.tt-cerez-anahtar input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.tt-cerez-anahtar-iz { position: absolute; inset: 0; border-radius: 15px; background: #8a8d80; transition: background-color .15s ease; }
.tt-cerez-anahtar-iz::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s ease; }
.tt-cerez-anahtar input:checked + .tt-cerez-anahtar-iz { background: var(--tt-logo-yesili, #3A5A19); }
.tt-cerez-anahtar input:checked + .tt-cerez-anahtar-iz::after { transform: translateX(22px); }
.tt-cerez-anahtar input:focus-visible + .tt-cerez-anahtar-iz { outline: 3px solid var(--tt-papaya, #E2792C); outline-offset: 2px; }

/* Çerez listesi */
.tt-cerez-liste summary { display: inline-block; min-height: 32px; padding: 4px 0; font-size: 14px; font-weight: 700; color: var(--tt-logo-yesili, #3A5A19); cursor: pointer; }
.tt-cerez-liste p { margin: 6px 0 0; font-size: 13.5px; color: var(--tt-zeytin-grisi, #5F6352); }
.tt-cerez-liste table { width: 100%; margin: 8px 0 0; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.tt-cerez-liste th, .tt-cerez-liste td { padding: 6px 8px; border: 1px solid #ece7d6; text-align: left; vertical-align: top; color: var(--tt-hass-mor-siyah, #2C2230); }
.tt-cerez-liste th { background: var(--tt-krem-zemin, #FAF7EC); font-weight: 700; }
.tt-cerez-liste code { padding: 0; background: none; color: inherit; font-size: 12.5px; word-break: break-word; white-space: normal; }

.tt-cerez-p-alt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 20px 18px; border-top: 1px solid #ece7d6; }

.tt-cerez .screen-reader-text, .tt-cerez-pencere .screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* --- Dar ekran: tam genişlik, alt çubukların üstünde --- */
@media (max-width: 575px) {
	.tt-cerez { left: 8px; right: 8px; width: auto; bottom: calc(8px + var(--tt-cerez-alt, 0px) + env(safe-area-inset-bottom)); }
	.tt-cerez-ic { padding: 12px 14px 14px; }
	.tt-cerez .tt-cerez-baslik { font-size: 16px; }
	.tt-cerez .tt-cerez-metin { font-size: 14px; margin-bottom: 10px; }
	.tt-cerez-pencere { padding: 0; align-items: flex-end; }
	.tt-cerez-p-kutu { width: 100%; max-height: 92vh; border-radius: 12px 12px 0 0; }
	.tt-cerez-p-alt { grid-template-columns: 1fr 1fr; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
	.tt-cerez-p-alt [data-tt-cerez="kaydet"] { grid-column: 1 / -1; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
	.tt-cerez-btn, .tt-cerez-anahtar-iz, .tt-cerez-anahtar-iz::after { transition: none; }
}
@media print { .tt-cerez, .tt-cerez-pencere { display: none !important; } }
