/* Çerez onayı — components/cerez-onay.blade.php. Statik dosya (Vite paketine girmez).
   Masaüstü: sol altta küçük kart (sağ alttaki erişilebilirlik / yukarı düğmeleriyle
   çakışmaz). Mobil: altta ince şerit. Tercih penceresi mobilde alttan açılan sayfa. */

.cerez-bant {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1065;
    width: 360px;
    max-width: calc(100vw - 32px);
    padding: 14px 16px;
    background: #fff;
    color: #1f2328;
    border: 1px solid #e3e6ea;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    font-size: 0.85rem;
    line-height: 1.45;
    animation: cerez-gir 0.25s ease-out;
}
.cerez-bant[hidden] { display: none; }

@keyframes cerez-gir {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .cerez-bant { animation: none; }
}

.cerez-bant-metin { margin: 0 0 12px; }
.cerez-ayrac { margin: 0 0.4em; color: #9ca3af; }
.cerez-bant-metin a,
.cerez-bag,
.cerez-pencere-giris a {
    color: var(--kgtu-link-color, #9c1c1f);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cerez-bag {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.cerez-bant-dugmeler,
.cerez-pencere-dugmeler {
    display: flex;
    gap: 8px;
}
.cerez-bant-dugmeler .cerez-btn { flex: 1 1 0; }

/* Reddet ve Kabul Et bilerek aynı görünüm (KVKK: ret, kabul kadar kolay) */
.cerez-btn {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: var(--kgtu-link-color, #9c1c1f);
    border: 1px solid var(--kgtu-link-color, #9c1c1f);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}
.cerez-btn:hover { background: #7a1518; border-color: #7a1518; }
.cerez-btn:focus-visible,
.cerez-bag:focus-visible,
.cerez-kapat:focus-visible { outline: 2px solid #1f2328; outline-offset: 2px; }

.cerez-btn-cizgi { color: var(--kgtu-link-color, #9c1c1f); background: transparent; }
.cerez-btn-cizgi:hover { color: #fff; }

/* Tercih penceresi (yerel <dialog>) */
.cerez-pencere {
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    color: #1f2328;
    background: #fff;
}
.cerez-pencere::backdrop { background: rgba(0, 0, 0, 0.45); }
.cerez-pencere-ic { padding: 18px 18px 16px; font-size: 0.85rem; line-height: 1.45; }

.cerez-pencere-ust { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cerez-pencere-baslik { margin: 0; font-size: 1rem; font-weight: 700; }
.cerez-kapat {
    border: 0;
    background: transparent;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    margin-right: -6px;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
}
.cerez-kapat:hover { color: #1f2328; background: #f1f3f5; }

.cerez-pencere-giris { margin: 0 0 12px; color: #4b5563; }

.cerez-kategori { padding: 10px 0; border-top: 1px solid #eceef1; }
.cerez-kategori:last-of-type { border-bottom: 1px solid #eceef1; }
.cerez-kategori p { margin: 2px 0 0; color: #6b7280; font-size: 0.8rem; }
.cerez-kategori-ust { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cerez-kategori-ad { font-weight: 600; margin: 0; }
.cerez-her-zaman { font-size: 0.75rem; color: #6b7280; white-space: nowrap; }
.cerez-kategori .form-check-input { width: 2.4em; height: 1.3em; margin: 0; cursor: pointer; }
.cerez-kategori .form-check-input:checked {
    background-color: var(--kgtu-link-color, #9c1c1f);
    border-color: var(--kgtu-link-color, #9c1c1f);
}

.cerez-pencere-dugmeler { margin-top: 14px; }
.cerez-pencere-dugmeler .cerez-btn { flex: 1 1 0; padding: 0 8px; }

/* Footer bağlantıları */
.cerez-footer-baglanti {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    font: inherit;
}

/* Mobil: altta ince şerit + alttan açılan pencere */
@media (max-width: 575.98px) {
    .cerez-bant {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-width: none;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
        border: 0;
        border-top: 1px solid #e3e6ea;
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
        font-size: 0.8rem;
    }
    .cerez-bant-metin { margin-bottom: 10px; }
    .cerez-btn { min-height: 42px; }

    .cerez-pencere {
        width: 100vw;
        max-width: 100vw;
        max-height: 85vh;
        margin: auto 0 0;
        border-radius: 16px 16px 0 0;
    }
    .cerez-pencere-ic { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
    .cerez-pencere-dugmeler { flex-wrap: wrap; }
    .cerez-pencere-dugmeler .cerez-btn-cizgi { flex-basis: 100%; order: 3; }
}

/* Koyu tema */
html[data-bs-theme="dark"] .cerez-bant,
html[data-bs-theme="dark"] .cerez-pencere { background: #1d2125; color: #e6e8ea; border-color: #2c3238; }
html[data-bs-theme="dark"] .cerez-bant-metin a,
html[data-bs-theme="dark"] .cerez-bag,
html[data-bs-theme="dark"] .cerez-pencere-giris a,
html[data-bs-theme="dark"] .cerez-btn-cizgi { color: #e6a3a5; }
html[data-bs-theme="dark"] .cerez-btn-cizgi { border-color: #e6a3a5; }
html[data-bs-theme="dark"] .cerez-btn-cizgi:hover { color: #fff; background: #9c1c1f; border-color: #9c1c1f; }
html[data-bs-theme="dark"] .cerez-pencere-giris,
html[data-bs-theme="dark"] .cerez-kategori p,
html[data-bs-theme="dark"] .cerez-her-zaman,
html[data-bs-theme="dark"] .cerez-kapat { color: #a6adb4; }
html[data-bs-theme="dark"] .cerez-kategori,
html[data-bs-theme="dark"] .cerez-kategori:last-of-type { border-color: #2c3238; }
html[data-bs-theme="dark"] .cerez-kapat:hover { background: #2c3238; color: #e6e8ea; }
html[data-bs-theme="dark"] .cerez-btn:focus-visible { outline-color: #e6e8ea; }
