/* KVKK çerez izin paneli — yalnız panel açık tenant'ta yüklenir (Views/Shared/Consent/_CookieConsent.cshtml).
   Koyu kart + marka rengi vurgu. Vurgu düğmesinin yazısı --on-primary (theme-tokens bloğu her tenant'ta basar):
   marka rengine göre beyaz ya da siyah, kontrast korunur. "Reddet" ve "Kabul Et" bilerek aynı stilde. */
.esbi-cc {
    --cc-bg: #161616;
    --cc-fg: #f3f3f3;
    --cc-muted: #b9b9b9;
    --cc-line: rgba(255, 255, 255, .14);
    --cc-accent: var(--primaryColor, #ffcd29);
    --cc-on-accent: var(--on-primary, #111);
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 2147483000;
    width: min(560px, calc(100vw - 32px));
    font-family: var(--site-font-family, inherit);
}
.esbi-cc[hidden] { display: none; }
.esbi-cc__card,
.esbi-cc-dlg__body {
    background: var(--cc-bg);
    color: var(--cc-fg);
    border: 1px solid var(--cc-line);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .35);
    padding: 20px 22px;
}
.esbi-cc__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--cc-fg);
}
.esbi-cc__title .fa-cookie-bite { color: var(--cc-accent); }
.esbi-cc__text {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--cc-fg);
}
.esbi-cc__links { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.esbi-cc__links a,
.esbi-cc-dlg__body a {
    color: var(--cc-fg);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.esbi-cc__links a:hover { text-decoration-thickness: 2px; }
.esbi-cc__actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 6px;
}
.esbi-cc__btn {
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, filter .15s ease;
}
.esbi-cc__btn--main {
    background: var(--cc-accent);
    color: var(--cc-on-accent);
    border: 1px solid var(--cc-accent);
}
.esbi-cc__btn--main:hover { filter: brightness(1.08); }
.esbi-cc__btn--ghost {
    background: transparent;
    color: var(--cc-fg);
    border: 1px solid rgba(255, 255, 255, .4);
}
.esbi-cc__btn--ghost:hover { border-color: var(--cc-fg); background: rgba(255, 255, 255, .06); }
.esbi-cc__btn:focus-visible,
.esbi-cc-dlg__close:focus-visible,
.esbi-cc-switch:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Tercihler penceresi */
.esbi-cc-dlg {
    --cc-bg: #161616;
    --cc-fg: #f3f3f3;
    --cc-muted: #b9b9b9;
    --cc-line: rgba(255, 255, 255, .14);
    --cc-accent: var(--primaryColor, #ffcd29);
    --cc-on-accent: var(--on-primary, #111);
    padding: 0;
    border: 0;
    background: transparent;
    width: min(620px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    font-family: var(--site-font-family, inherit);
    z-index: 2147483001;
}
.esbi-cc-dlg::backdrop { background: rgba(0, 0, 0, .6); }
.esbi-cc-dlg__body { max-height: calc(100vh - 24px); overflow-y: auto; }
.esbi-cc-dlg__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.esbi-cc-dlg__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: var(--cc-fg);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.esbi-cc-cat {
    border-top: 1px solid var(--cc-line);
    padding: 14px 0;
}
.esbi-cc-cat__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    cursor: pointer;
}
.esbi-cc-cat__name { font-size: 15px; font-weight: 700; color: var(--cc-fg); }
.esbi-cc-cat__always { font-size: 13px; font-weight: 600; color: var(--cc-fg); }
.esbi-cc-cat__desc { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--cc-muted); }

/* Anahtar (switch) */
.esbi-cc-switch {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    position: relative;
    width: 48px;
    height: 28px;
    margin: 0;
    border-radius: 28px;
    background: #4a4a4a;
    cursor: pointer;
    transition: background-color .15s ease;
}
.esbi-cc-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s ease;
}
.esbi-cc-switch:checked { background: var(--cc-accent); }
.esbi-cc-switch:checked::after { transform: translateX(20px); background: var(--cc-on-accent); }

/* Mobil: alttan tam genişlik kart, düğmeler alt alta (dokunma hedefi ≥ 44px) */
@media (max-width: 575.98px) {
    .esbi-cc {
        left: 0;
        bottom: 0;
        width: 100%;
    }
    .esbi-cc__card {
        border-radius: 16px 16px 0 0;
        border-bottom: 0;
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    }
    .esbi-cc__title { font-size: 16px; }
    .esbi-cc__text { font-size: 13px; }
    .esbi-cc__actions { grid-template-columns: 1fr 1fr; }
    .esbi-cc__actions [data-cc="prefs"],
    .esbi-cc__actions [data-cc="save"] { grid-column: 1 / -1; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
    .esbi-cc__btn,
    .esbi-cc-switch,
    .esbi-cc-switch::after { transition: none; }
}
