/* ── Cookie Banner ───────────────────────────────────────────────────────────── */
#cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: calc(100vw - 48px);
    max-width: 860px;
    background: #1a1a1a;
    border: 1px solid rgba(245,197,24,0.2);
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.45);
    z-index: 9000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: 'Nunito Sans', sans-serif;
}
.cb-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 24px;
    flex-wrap: wrap;
}

.cb-text {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    flex: 1;
    min-width: 220px;
}

    .cb-text strong {
        color: #ffffff;
        font-weight: 800;
        margin-right: 6px;
    }

.cb-link {
    color: #F5C518;
    text-decoration: none;
    font-weight: 700;
    margin-left: 6px;
    font-size: 12px;
}

    .cb-link:hover {
        text-decoration: underline;
    }

.cb-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cb-btn {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 18px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.cb-btn--accept {
    background: #F5C518;
    color: #111111;
}

    .cb-btn--accept:hover {
        background: #d4a80e;
        transform: translateY(-1px);
    }

.cb-btn--reject {
    background: transparent;
    color: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.15);
}

    .cb-btn--reject:hover {
        color: #ffffff;
        border-color: rgba(255,255,255,0.35);
    }

.cb-btn--settings {
    background: transparent;
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.1);
}

    .cb-btn--settings:hover {
        color: rgba(255,255,255,0.75);
        border-color: rgba(255,255,255,0.25);
    }

/* ── Cookie Panel (preferenze) ───────────────────────────────────────────────── */
#cookie-panel {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Nunito Sans', sans-serif;
}

.cp-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.cp-box {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    margin: 0 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    overflow: hidden;
}

.cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cp-title {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.cp-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.18s, background 0.18s;
}

    .cp-close:hover {
        color: #ffffff;
        background: rgba(255,255,255,0.08);
    }

.cp-body {
    padding: 20px 24px;
}

.cp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cp-row-info strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.cp-row-info p {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    line-height: 1.55;
    margin: 0;
}

.cp-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 18px 0;
}

/* Toggle ON fisso (cookie necessari) */
.cp-toggle {
    font-size: 10px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.cp-toggle--on {
    background: rgba(245,197,24,0.15);
    color: #F5C518;
    border: 1px solid rgba(245,197,24,0.3);
}

.cp-toggle--disabled {
    cursor: not-allowed;
}

/* Switch toggle */
.cp-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

    .cp-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.cp-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 24px;
    transition: background 0.2s;
}

    .cp-slider::before {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        left: 3px;
        top: 3px;
        background: rgba(255,255,255,0.6);
        border-radius: 50%;
        transition: transform 0.2s, background 0.2s;
    }

.cp-switch input:checked + .cp-slider {
    background: #F5C518;
}

    .cp-switch input:checked + .cp-slider::before {
        transform: translateX(20px);
        background: #111111;
    }

.cp-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: flex-end;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    #cookie-banner {
        bottom: 16px;
    }

    .cb-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px 18px;
    }

    .cb-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .cb-btn {
        font-size: 11px;
        padding: 8px 14px;
    }
}
