/* ==========================================================================
   LUIBERA — Cookie Consent
   Beyaz / Siyah / Koyu Mor (#301934) — Jost
   ========================================================================== */

.lui-cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 24, 0.45);
    backdrop-filter: blur(2px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.lui-cc-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.lui-cc {
    font-family: 'Jost', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
    box-sizing: border-box;
}
.lui-cc *,
.lui-cc *::before,
.lui-cc *::after { box-sizing: border-box; }

/* --- BANNER (ilk gelen popup) --- */
.lui-cc-banner {
    position: fixed;
    z-index: 99999;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    width: calc(100% - 32px);
    max-width: 880px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 28px 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}
.lui-cc-banner.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.lui-cc-banner__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 10px;
    color: #1a1a1a;
    letter-spacing: 0.2px;
}
.lui-cc-banner__text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #555;
    margin: 0 0 14px;
}
.lui-cc-banner__links {
    font-size: 0.8rem;
    margin-bottom: 18px;
    color: #888;
}
.lui-cc-banner__links a {
    color: #301934;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-right: 14px;
}
.lui-cc-banner__links a:hover { color: #4a2d54; }

.lui-cc-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- BUTONLAR (eşit görünürlükte — dark pattern yok) --- */
.lui-cc-btn {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 11px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.2;
    letter-spacing: 0.2px;
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
}
.lui-cc-btn:focus-visible {
    outline: 2px solid #301934;
    outline-offset: 2px;
}

.lui-cc-btn--primary {
    background: #301934;
    color: #ffffff;
    border-color: #301934;
}
.lui-cc-btn--primary:hover { background: #4a2d54; border-color: #4a2d54; }

.lui-cc-btn--outline {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #1a1a1a;
}
.lui-cc-btn--outline:hover { background: #1a1a1a; color: #ffffff; }

.lui-cc-btn--ghost {
    background: transparent;
    color: #555;
    border-color: #cccccc;
}
.lui-cc-btn--ghost:hover { color: #1a1a1a; border-color: #1a1a1a; }

/* --- MODAL (Tercihleri Belirle ekranı) --- */
.lui-cc-modal {
    position: fixed;
    z-index: 99999;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -45%);
    width: calc(100% - 32px);
    max-width: 640px;
    max-height: 88vh;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    overflow: hidden;
}
.lui-cc-modal.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.lui-cc-modal__header {
    padding: 22px 28px 16px;
    border-bottom: 1px solid #eaeaea;
    position: relative;
}
.lui-cc-modal__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a1a1a;
}
.lui-cc-modal__subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.55;
}
.lui-cc-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.lui-cc-modal__close:hover { color: #1a1a1a; background: #f5f5f5; }
.lui-cc-modal__close:focus-visible { outline: 2px solid #301934; outline-offset: 2px; }

.lui-cc-modal__body {
    padding: 8px 28px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.lui-cc-modal__footer {
    padding: 16px 28px 22px;
    border-top: 1px solid #eaeaea;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: #fafafa;
}

/* --- KATEGORİ KARTI --- */
.lui-cc-cat {
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 16px 18px;
    margin-top: 14px;
    transition: border-color 0.2s ease;
}
.lui-cc-cat:first-child { margin-top: 4px; }
.lui-cc-cat:hover { border-color: #d4d4d4; }

.lui-cc-cat__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.lui-cc-cat__name {
    font-size: 0.98rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}
.lui-cc-cat__desc {
    font-size: 0.83rem;
    color: #666;
    line-height: 1.6;
    margin: 8px 0 0;
}

/* --- TOGGLE SWITCH --- */
.lui-cc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.lui-cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.lui-cc-toggle__slider {
    position: absolute;
    inset: 0;
    background: #cccccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s ease;
}
.lui-cc-toggle__slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform .2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.lui-cc-toggle input:checked + .lui-cc-toggle__slider {
    background: #301934;
}
.lui-cc-toggle input:checked + .lui-cc-toggle__slider::before {
    transform: translateX(20px);
}
.lui-cc-toggle input:focus-visible + .lui-cc-toggle__slider {
    box-shadow: 0 0 0 3px rgba(48, 25, 52, 0.25);
}
.lui-cc-toggle input:disabled + .lui-cc-toggle__slider {
    background: #301934;
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- FOOTER LİNK ("Çerez Tercihlerini Yönet") --- */
.lui-cc-manage-link {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lui-cc-manage-link:hover { color: #ffffff; }

/* --- MOBİL: bottom sheet --- */
@media (max-width: 600px) {
    .lui-cc-banner {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        transform: translateY(100%);
        border-radius: 12px 12px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        padding: 22px 20px 24px;
    }
    .lui-cc-banner.is-visible {
        transform: translateY(0);
    }
    .lui-cc-banner__title { font-size: 1.1rem; }
    .lui-cc-banner__text { font-size: 0.85rem; }
    .lui-cc-banner__actions { flex-direction: column; }
    .lui-cc-btn { width: 100%; flex: 0 0 auto; }

    .lui-cc-modal {
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        max-width: none;
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
    }
    .lui-cc-modal.is-visible {
        transform: translateY(0);
    }
    .lui-cc-modal__header { padding: 20px 20px 14px; }
    .lui-cc-modal__body   { padding: 8px 20px 16px; }
    .lui-cc-modal__footer { padding: 14px 20px 20px; flex-direction: column; }
    .lui-cc-modal__footer .lui-cc-btn { width: 100%; }
}
