/**
 * Entegreci - Çerez Onayı
 *
 * KVKK: "Tümünü Reddet" ve "Tümünü Kabul Et" aynı görünürlükte olmalı; bu yüzden tüm
 * düğmeler bilerek aynı stili paylaşır.
 */

.entegreci-cerez[hidden],
.entegreci-cerez-modal[hidden],
.entegreci-cerez-tercih-dugmesi[hidden] {
    display: none !important;
}

.entegreci-cerez {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 16px 24px;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    color: #222;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18);
    font-size: 14px;
    line-height: 1.5;
}

.entegreci-cerez__icerik {
    flex: 1 1 auto;
}

.entegreci-cerez__baslik {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
}

.entegreci-cerez__metin {
    margin: 0;
}

.entegreci-cerez__linkler a {
    color: inherit;
    text-decoration: underline;
}

.entegreci-cerez__dugmeler {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
}

.entegreci-cerez__dugme {
    min-width: 150px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    background: #222;
    border: 1px solid #222;
    border-radius: 6px;
    cursor: pointer;
}

.entegreci-cerez__dugme:hover,
.entegreci-cerez__dugme:focus-visible {
    background: #000;
    border-color: #000;
}

.entegreci-cerez__dugme:focus-visible,
.entegreci-cerez-tercih-dugmesi:focus-visible,
.entegreci-cerez-modal__kapat:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Tercih penceresi */

.entegreci-cerez-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.5);
}

.entegreci-cerez-modal__kutu {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 24px;
    background: #fff;
    color: #222;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.entegreci-cerez-modal__kutu .entegreci-cerez__metin {
    margin-bottom: 16px;
}

.entegreci-cerez-modal__kutu .entegreci-cerez__dugmeler {
    margin-top: 16px;
    justify-content: flex-end;
}

.entegreci-cerez-modal__kapat {
    position: absolute;
    top: 8px;
    right: 12px;
    padding: 0 6px;
    font-size: 26px;
    line-height: 1;
    color: #555;
    background: none;
    border: 0;
    cursor: pointer;
}

html.entegreci-cerez-modal-acik {
    overflow: hidden;
}

.entegreci-cerez-kategori {
    padding: 12px 0;
    border-top: 1px solid #eee;
}

.entegreci-cerez-kategori__ust {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    font-weight: 700;
    cursor: pointer;
}

.entegreci-cerez-kategori__aciklama {
    margin: 4px 0 0;
    color: #555;
}

/* Anahtar (switch) görünümlü onay kutusu */

.entegreci-cerez-anahtar {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    margin: 0;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.entegreci-cerez-anahtar::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s;
}

.entegreci-cerez-anahtar:checked {
    background: #1e7e34;
}

.entegreci-cerez-anahtar:checked::after {
    transform: translateX(18px);
}

.entegreci-cerez-anahtar:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.entegreci-cerez-anahtar:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Kalıcı "Çerez Tercihleri" düğmesi */

.entegreci-cerez-tercih-dugmesi {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 2147482999;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.2;
    color: #222;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    opacity: 0.85;
}

.entegreci-cerez-tercih-dugmesi:hover {
    opacity: 1;
}

@media (max-width: 782px) {
    .entegreci-cerez {
        flex-direction: column;
        align-items: stretch;
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 14px;
    }

    .entegreci-cerez__dugmeler {
        flex-direction: column;
    }

    .entegreci-cerez__dugme {
        width: 100%;
    }

    .entegreci-cerez-modal__kutu .entegreci-cerez__dugmeler {
        justify-content: stretch;
    }
}
