/* ==========================================================================
   Çerez onayı — alt bant + tercih paneli (Views/Shared/_CerezOnay.cshtml)
   - XCARS görsel dili: kırmızı ana butonlar (.btn ile aynı), kırmızı açık ton
     (--red-tint) vurgular, Sora başlıklar. Renkler xcars.css :root'tan gelir.
   - Bant sayfayı KİLİTLEMEZ: masaüstünde sol altta kart (sağdaki WhatsApp
     butonuyla çakışmaz), mobilde tam genişlik alt panel.
   - Panelde kaydırma overlay'dedir, kutu margin:auto ile ortalanır
     (kısa ekranlarda üstten taşmaz).
   ========================================================================== */

.cz-bant[hidden], .cz-panel[hidden] { display: none !important; }

/* ---------------------------------------------------------------- butonlar */
.cz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    border-radius: var(--r-sm, 10px);
    font-family: var(--display);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background var(--t), color var(--t), border-color var(--t), box-shadow var(--t), transform var(--t);
}

/* "Reddet" ve "Tümünü Kabul Et" bilerek aynı görünümde (eşit ağırlık — Kurul rehberi). */
.cz-btn--ana {
    background: var(--red, #D81F26);
    color: #fff;
    border: 1.5px solid var(--red, #D81F26);
    box-shadow: 0 8px 20px var(--red-glow, rgba(216,31,38,.18));
}
    .cz-btn--ana:hover {
        background: var(--red-dark, #AE151B);
        border-color: var(--red-dark, #AE151B);
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 12px 26px var(--red-glow, rgba(216,31,38,.18));
    }
    .cz-btn--ana:active { transform: none; }

.cz-btn--cizgi {
    background: #fff;
    color: var(--ink, #14171A);
    border: 1.5px solid var(--line-2, #DDE2E6);
}
    .cz-btn--cizgi:hover { border-color: var(--red, #D81F26); color: var(--red, #D81F26); background: var(--red-tint, #FCEBEC); }

.cz-btn:focus-visible,
.cz-panel__kapat:focus-visible,
.cz-anahtar input:focus-visible + .cz-anahtar__iz {
    outline: 2px solid var(--red, #D81F26);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------- ortak başlık (ikon + başlık) */
.cz-ust {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
}

.cz-ikon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--red-tint, #FCEBEC);
    color: var(--red, #D81F26);
}
    .cz-ikon svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- alt bant */
.cz-bant {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 1000; /* header (50), WhatsApp (60) ve hikâye görüntüleyicinin (200) üstünde */
    width: min(540px, calc(100vw - 44px));
    background: linear-gradient(160deg, var(--red-tint, #FCEBEC) 0%, #fff 42%);
    color: var(--ink, #14171A);
    border: 1px solid rgba(216, 31, 38, .18);
    border-radius: var(--r-lg, 20px);
    box-shadow: var(--sh-3, 0 30px 70px rgba(9,11,14,.16));
    padding: 20px 22px;
    overflow: hidden;
    animation: czIn .25s cubic-bezier(.4, 0, .2, 1);
}
    /* Üstte ince marka şeridi */
    .cz-bant::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--red, #D81F26), var(--red-2, #E23A40));
    }

.cz-bant__baslik {
    font-family: var(--display);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink, #14171A);
    margin: 0;
}

.cz-bant__metin {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted, #697682);
    margin: 0 0 8px;
}

.cz-bant__linkler,
.cz-panel__alt {
    font-size: 13px;
    color: var(--muted, #697682);
    margin: 0;
}
    .cz-bant__linkler a,
    .cz-panel__alt a {
        color: var(--red, #D81F26);
        font-weight: 600;
        text-decoration: underline;
        text-underline-offset: 2px;
        transition: color var(--t);
    }
    .cz-bant__linkler a:hover,
    .cz-panel__alt a:hover { color: var(--red-dark, #AE151B); }
    .cz-bant__linkler span,
    .cz-panel__alt span { margin: 0 6px; color: var(--faint, #9AA6B0); }

.cz-bant__btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}
    .cz-bant__btns .cz-btn--cizgi { grid-column: 1 / -1; }

@keyframes czIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
    .cz-bant {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        border-radius: var(--r-lg, 20px) var(--r-lg, 20px) 0 0;
        border-bottom: none;
        padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        max-height: 85vh;
        overflow-y: auto;
    }
    .cz-bant__metin { font-size: 13.5px; }
    .cz-ikon { width: 38px; height: 38px; }
}

/* ---------------------------------------------------------------- panel */
.cz-panel {
    position: fixed;
    inset: 0;
    z-index: 1010;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 16px;
    background: rgba(9, 11, 14, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

body.cz-panel-acik { overflow: hidden; }

.cz-panel__kutu {
    position: relative;
    width: 100%;
    max-width: 580px;
    margin: auto;
    background: var(--card, #fff);
    color: var(--ink, #14171A);
    border-radius: var(--r-lg, 20px);
    box-shadow: var(--sh-3, 0 30px 70px rgba(9,11,14,.16));
    padding: 0 24px 22px;
    overflow: hidden;
    animation: czIn .22s cubic-bezier(.4, 0, .2, 1);
}

/* Panel başlığı: bant ile aynı kırmızı açık ton + şerit */
.cz-panel__ust {
    position: relative;
    margin: 0 -24px 18px;
    padding: 26px 64px 18px 24px;
    background: linear-gradient(135deg, var(--red-tint, #FCEBEC) 0%, #fff 100%);
    border-bottom: 1px solid rgba(216, 31, 38, .14);
}
    .cz-panel__ust::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--red, #D81F26), var(--red-2, #E23A40));
    }
    .cz-panel__ust .cz-ust { margin-bottom: 10px; }

.cz-panel__kapat {
    position: absolute;
    top: 14px;
    right: 12px;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--muted, #697682);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--t), color var(--t);
}
    .cz-panel__kapat:hover { background: #fff; color: var(--red, #D81F26); }
    .cz-panel__kapat svg { width: 20px; height: 20px; }

.cz-panel__baslik {
    font-family: var(--display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink, #14171A);
    margin: 0;
}

.cz-panel__giris {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted, #697682);
    margin: 0;
}

.cz-kat {
    border: 1px solid var(--line, #E7EAED);
    border-radius: var(--r, 14px);
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: border-color var(--t), background var(--t);
}
    /* Açık kategori: kırmızı çerçeve + açık ton (zorunlu kategori de her zaman açık görünür) */
    .cz-kat--sabit,
    .cz-kat:has(input:checked) {
        border-color: rgba(216, 31, 38, .32);
        background: linear-gradient(135deg, var(--red-tint, #FCEBEC) 0%, #fff 70%);
    }

.cz-kat__ust {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    cursor: pointer;
}
div.cz-kat__ust { cursor: default; }

.cz-kat__ad { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--ink, #14171A); }
.cz-kat__sabit {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--red, #D81F26);
    background: #fff;
    border: 1px solid rgba(216, 31, 38, .25);
    border-radius: 100px;
    padding: 4px 10px;
    white-space: nowrap;
}

.cz-kat__acik {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--muted, #697682);
    margin: 6px 0 0;
}

/* Anahtar (switch) — gerçek checkbox görünmez ama erişilebilir kalır */
.cz-anahtar { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
.cz-anahtar input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.cz-anahtar__iz {
    position: absolute;
    inset: 0;
    border-radius: 100px;
    background: var(--line-2, #DDE2E6);
    transition: background var(--t);
    pointer-events: none;
}
    .cz-anahtar__iz::after {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 3px rgba(20, 23, 26, .25);
        transition: transform var(--t);
    }
.cz-anahtar input:checked + .cz-anahtar__iz { background: var(--red, #D81F26); }
    .cz-anahtar input:checked + .cz-anahtar__iz::after { transform: translateX(20px); }

.cz-panel__btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 18px 0 14px;
}

.cz-panel__alt { text-align: center; }

@media (max-width: 560px) {
    .cz-panel__btns { grid-template-columns: 1fr; }
    .cz-panel__kutu { padding: 0 18px 18px; }
    .cz-panel__ust { margin: 0 -18px 16px; padding: 22px 56px 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .cz-bant, .cz-panel__kutu { animation: none; }
}

/* Çerez Politikası sayfasındaki "Çerez tercihleriniz" kutusu (#tercihler) —
   sayfa sonundaki .legal-cta ile aynı kırmızı açık ton */
.cz-durum {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 30px;
    padding: 20px 22px;
    background: linear-gradient(135deg, var(--red-tint, #FCEBEC) 0%, #fff 100%);
    border: 1px solid rgba(216, 31, 38, .2);
    border-radius: var(--r-lg, 20px);
    box-shadow: var(--sh-1, 0 1px 2px rgba(20,23,26,.05));
    scroll-margin-top: 110px; /* sabit header altında kalmasın */
}
.cz-durum__baslik { font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--ink, #14171A); margin: 0 0 8px; }
.legal-body .cz-durum__liste,
.cz-durum__liste {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted, #697682);
}
    .legal-body .cz-durum__liste li { padding-left: 0; }
    .legal-body .cz-durum__liste li:before { content: none; }
    .cz-durum__liste b { font-weight: 700; color: var(--faint, #9AA6B0); }
    .cz-durum__liste b.is-acik { color: var(--red, #D81F26); }
.cz-durum__not { font-size: 13px; color: var(--muted, #697682); margin: 8px 0 0; }
.cz-durum .cz-btn { flex: 0 0 auto; }

@media (max-width: 560px) {
    .cz-durum { flex-direction: column; align-items: stretch; }
}

/* Altbilgideki "Çerez tercihleri" — diğer yasal linklerle aynı görünüm (.fcol2 a) */
.fcerez-btn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--ink);
    opacity: .88;
    cursor: pointer;
    text-align: left;
    transition: color var(--t);
}
    .fcerez-btn:hover { color: var(--red); }
