/* Cookie Consent IL v2 */

/* ── CSS variables ────────────────────────────────────────────────────────── */
:root {
    --cc-bg:     #1a1a2e;
    --cc-accent: #25D366;
}

/* ── Bottom banner ────────────────────────────────────────────────────────── */
#cc-il-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999990;
    background: var(--cc-bg);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 -4px 20px rgba(0,0,0,.4);
    transform: translateY(100%);
    transition: transform .4s ease;
}

#cc-il-banner.cc-il-visible {
    transform: translateY(0);
}

.cc-il-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cc-il-text {
    flex: 1 1 260px;
}

.cc-il-text strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.cc-il-text p {
    margin: 0;
    opacity: .9;
}

.cc-il-text a {
    color: var(--cc-accent);
    text-decoration: underline;
    margin-right: 6px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.cc-il-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cc-il-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    white-space: nowrap;
    line-height: 1;
}

.cc-il-btn:hover  { opacity: .85; transform: translateY(-1px); }
.cc-il-btn:active { transform: translateY(0); }

.cc-il-btn-accept {
    background: var(--cc-accent);
    color: #ffffff;
}

.cc-il-btn-manage {
    background: rgba(255,255,255,.15);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,.4);
}

.cc-il-btn-decline {
    background: transparent;
    color: rgba(255,255,255,.7);
    border: 1px solid rgba(255,255,255,.3);
}

/* ── Overlay ──────────────────────────────────────────────────────────────── */
#cc-il-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 999995;
}

#cc-il-overlay.cc-il-active {
    display: block;
}

/* ── Preferences panel ────────────────────────────────────────────────────── */
#cc-il-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.95);
    z-index: 999999;
    background: #ffffff;
    color: #222222;
    font-family: Arial, sans-serif;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    width: min(520px, calc(100vw - 32px));
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}

#cc-il-panel:not([hidden]) {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* hidden attr keeps it out of layout; we animate with opacity/transform */
#cc-il-panel[hidden] {
    display: none;
}

.cc-il-panel-inner {
    padding: 28px 24px 20px;
    direction: rtl;
}

.cc-il-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--cc-accent);
    padding-bottom: 10px;
}

.cc-il-panel-inner h3 {
    margin: 0;
    font-size: 18px;
    color: #111;
}

.cc-il-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: color .15s, background .15s;
}

.cc-il-close-btn:hover {
    color: #333;
    background: #f0f0f0;
}

/* ── Category rows ────────────────────────────────────────────────────────── */
.cc-il-category {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.cc-il-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cc-il-cat-title span {
    font-weight: 700;
    font-size: 14px;
    color: #111;
}

.cc-il-cat-desc {
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.cc-il-always-on {
    font-size: 12px;
    font-weight: 700;
    color: var(--cc-accent);
    white-space: nowrap;
}

/* ── Toggle switch ────────────────────────────────────────────────────────── */
.cc-il-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.cc-il-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cc-il-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    transition: background .2s;
}

.cc-il-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.cc-il-toggle input:checked + .cc-il-slider {
    background: var(--cc-accent);
}

.cc-il-toggle input:checked + .cc-il-slider::before {
    transform: translateX(20px);
}

/* ── Panel buttons ────────────────────────────────────────────────────────── */
.cc-il-panel-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.cc-il-panel-buttons .cc-il-btn {
    padding: 11px 24px;
    font-size: 14px;
}

.cc-il-panel-buttons .cc-il-btn-accept {
    background: var(--cc-accent);
    color: #fff;
}

.cc-il-panel-buttons .cc-il-btn-manage {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

/* ── Footer settings link ─────────────────────────────────────────────────── */
#cc-il-footer-link {
    position: fixed;
    bottom: 12px;
    left: 12px;
    z-index: 999997;
}

#cc-il-footer-link[hidden] {
    display: none;
}

#cc-il-open-panel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,.65);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 7px 14px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: background .2s;
    backdrop-filter: blur(4px);
}

#cc-il-open-panel:hover {
    background: rgba(0,0,0,.82);
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .cc-il-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .cc-il-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .cc-il-btn-accept {
        grid-column: 1 / -1;
    }

    .cc-il-panel-buttons {
        flex-direction: column;
    }

    .cc-il-panel-buttons .cc-il-btn {
        width: 100%;
        text-align: center;
    }
}
