/* ==========================================================================
   ÇEREZ (KVKK/GDPR) BARI + TERCİH MODALI — simyayayinlari.local'den port (2026-07).
   Renkler bogazici mor temaya uyarlandı; eksik gri/radius/font var'ları burada tanımlı.
   Her sayfada yüklenir (head.php). JS: /assets/tema/js/cerez.js — banner: tema/core/cerez.php.
   ========================================================================== */
:root {
    --gray-900: #1e1a2e;
    --gray-700: #4b4b63;
    --gray-500: #9ca3af;
    --gray-400: #c4c4d4;
    --gray-300: #d1d5db;
    --gray-200: #e8e8ee;
    --gray-50:  #f9fafb;
    --radius:    16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --font-heading: var(--font-body);
}

.cerez-bar {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 1040;
    background: #16161d;
    color: #f3f3f5;
    box-shadow: 0 -6px 28px rgba(0,0,0,0.22);
    transform: translateY(0);
    transition: transform 0.45s cubic-bezier(0.22,1,0.36,1), opacity 0.45s ease;
}
.cerez-bar--gizli { transform: translateY(110%); opacity: 0; pointer-events: none; }
.cerez-bar__inner {
    max-width: 1240px; margin: 0 auto;
    padding: 0.7rem 1.5rem;
    display: flex; align-items: center; flex-wrap: nowrap; gap: 1.25rem;
}
.cerez-bar__metin {
    margin: 0; font-size: 0.875rem; line-height: 1.5;
    display: flex; align-items: center; gap: 0.7rem;
    flex: 1 1 auto; min-width: 0;
}
.cerez-bar__metin > i { color: var(--primary); font-size: 1.35rem; flex: none; }
.cerez-bar__metin > span { min-width: 0; }
.cerez-bar__link { color: #fff; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.cerez-bar__link:hover { color: var(--primary-light); }
.cerez-bar__aksiyon { display: flex; align-items: center; gap: 0.5rem; flex: none; }

/* Ortak buton stilleri (bar + modal) */
.cerez-btn {
    border: 0; border-radius: 9px; cursor: pointer; white-space: nowrap;
    font-family: var(--font-heading); font-weight: 600; font-size: 0.85rem;
    padding: 0.5rem 1.15rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.cerez-btn--kabul { background: var(--primary); color: var(--white); box-shadow: 0 4px 14px rgba(128,44,142,0.28); }
.cerez-btn--kabul:hover { background: var(--primary-dark); transform: translateY(-1px); }
.cerez-btn--reddet { background: transparent; color: #e7e7ea; border: 1px solid rgba(255,255,255,0.3); }
.cerez-btn--reddet:hover { border-color: #fff; background: rgba(255,255,255,0.06); }
.cerez-btn--ayar { background: transparent; color: #b9b9c2; padding-inline: 0.5rem; text-decoration: underline; text-underline-offset: 3px; }
.cerez-btn--ayar:hover { color: #fff; }

/* Tercih modalı */
.cerez-modal { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cerez-modal[hidden] { display: none; }
.cerez-modal__arka { position: absolute; inset: 0; background: rgba(10,10,18,0.55); backdrop-filter: blur(2px); }
.cerez-modal__kutu {
    position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
    background: var(--white); border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,0.35);
    animation: cerezModalAc 0.28s cubic-bezier(0.22,1,0.36,1);
}
@keyframes cerezModalAc { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cerez-modal__ust { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--gray-200); }
.cerez-modal__ust h3 { margin: 0; font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; color: var(--gray-900); }
.cerez-modal__ust h3 i { color: var(--primary); margin-right: 0.4rem; }
.cerez-modal__x { background: transparent; border: 0; color: var(--gray-500); font-size: 1.1rem; cursor: pointer; padding: 0.3rem; line-height: 1; }
.cerez-modal__x:hover { color: var(--primary); }
.cerez-modal__govde { padding: 1.3rem 1.5rem; }
.cerez-modal__giris { font-size: 0.88rem; color: var(--gray-600); line-height: 1.7; margin: 0 0 1.2rem; }
.cerez-modal__giris .cerez-bar__link { color: var(--primary); white-space: normal; }
/* Modal logo (başlık) */
.cerez-modal__logo { height: 34px; width: auto; display: block; }

/* Modal sekmeleri (Ayarlar / Çerez Politikası) */
.cerez-sekmeler { display: flex; gap: 1.4rem; padding: 0 1.5rem; border-bottom: 1px solid var(--gray-200); }
.cerez-sekme { background: none; border: 0; cursor: pointer; padding: 0.85rem 0; font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.2s, border-color 0.2s; }
.cerez-sekme:hover { color: var(--primary); }
.cerez-sekme--aktif { color: var(--primary); border-bottom-color: var(--primary); }
.cerez-sekme-panel { display: none; }
.cerez-sekme-panel--aktif { display: block; }

/* Uyumluluk rozetleri (Çerez Politikası sekmesi — KVKK / GDPR / Consent Mode v2) */
.cerez-uyum { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--gray-200); }
.cerez-uyum-baslik { font-family: var(--font-heading); font-size: 0.92rem; font-weight: 700; color: var(--gray-900); margin: 0 0 0.6rem; }
.cerez-uyum-kart { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.7rem 0; }
.cerez-uyum-kart + .cerez-uyum-kart { border-top: 1px solid var(--gray-100); }
.cerez-uyum-ikon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(128,44,142,0.08); color: var(--primary); font-size: 1rem; }
.cerez-uyum-metin strong { display: block; font-size: 0.87rem; color: var(--gray-900); font-weight: 700; margin-bottom: 0.12rem; }
.cerez-uyum-metin span { font-size: 0.79rem; color: var(--gray-500); line-height: 1.5; }

/* Akordeon kategori */
.cerez-kat { padding: 0; border-top: 1px solid var(--gray-100); }
.cerez-kat:first-child { border-top: 0; }
.cerez-kat__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; }
.cerez-kat__ac { flex: 1 1 auto; display: flex; align-items: center; gap: 0.6rem; background: none; border: 0; cursor: pointer; padding: 0; text-align: left; min-width: 0; }
.cerez-kat__ac strong { font-size: 0.95rem; color: var(--gray-900); font-weight: 700; }
.cerez-kat__ok { color: var(--gray-400); font-size: 0.72rem; transition: transform 0.25s ease, color 0.2s; flex: none; }
.cerez-kat--acik .cerez-kat__ok { transform: rotate(90deg); color: var(--primary); }
.cerez-kat__hep { flex: none; font-size: 0.76rem; font-weight: 700; color: var(--primary); background: rgba(128,44,142,0.08); padding: 0.25rem 0.7rem; border-radius: 50px; }
.cerez-kat__aciklama { display: none; font-size: 0.83rem; color: var(--gray-500); line-height: 1.6; padding: 0 0 0.9rem 1.35rem; }
.cerez-kat--acik .cerez-kat__aciklama { display: block; animation: cerezKatAc 0.25s ease; }
@keyframes cerezKatAc { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Sol-alt yüzen çerez tercih ikonu (rıza sonrası görünür) */
.cerez-fab {
    position: fixed; left: 2rem; bottom: 2rem; z-index: 1050;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--white); color: var(--primary);
    border: 1px solid var(--gray-200);
    box-shadow: 0 8px 25px rgba(0,0,0,0.16);
    font-size: 1.75rem; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.cerez-fab--gorunur { display: flex; }
.cerez-fab:hover { transform: translateY(-3px) rotate(-8deg); box-shadow: 0 10px 28px rgba(128,44,142,0.3); background: var(--primary); color: #fff; }
.cerez-modal__alt { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-end; padding: 1.1rem 1.5rem; border-top: 1px solid var(--gray-200); background: var(--gray-50); border-radius: 0 0 16px 16px; }
.cerez-modal__alt .cerez-btn--reddet { color: var(--gray-700); border-color: var(--gray-300); }
.cerez-modal__alt .cerez-btn--reddet:hover { border-color: var(--gray-500); background: var(--gray-100); }
.cerez-modal__alt .cerez-btn--ayar { color: var(--primary); }
.cerez-modal__alt .cerez-btn--ayar:hover { color: var(--primary-dark); }

/* Toggle switch */
.cerez-switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.cerez-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.cerez-switch__yuva { position: absolute; inset: 0; background: var(--gray-300); border-radius: 999px; transition: background 0.2s; }
.cerez-switch__yuva::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.25); transition: transform 0.2s; }
.cerez-switch input:checked + .cerez-switch__yuva { background: var(--primary); }
.cerez-switch input:checked + .cerez-switch__yuva::after { transform: translateX(20px); }
.cerez-switch input:disabled + .cerez-switch__yuva { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 860px) {
    .cerez-bar__inner { flex-wrap: wrap; padding: 0.85rem 1.1rem; gap: 0.75rem; }
    .cerez-bar__metin { flex: 1 1 100%; }
    .cerez-bar__aksiyon { flex: 1 1 100%; justify-content: flex-end; }
}
@media (max-width: 520px) {
    .cerez-bar__aksiyon { flex-wrap: wrap; }
    .cerez-bar__aksiyon .cerez-btn--reddet, .cerez-bar__aksiyon .cerez-btn--kabul { flex: 1 1 auto; text-align: center; }
    .cerez-modal__alt { justify-content: stretch; }
    .cerez-modal__alt .cerez-btn { flex: 1 1 auto; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .cerez-bar, .cerez-modal__kutu { transition: none; animation: none; } }
