/* Cookie Banner - Stile Iubenda */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e283c;
    color: #fff;
    z-index: 99999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s ease;
    font-family: inherit;
}
.cookie-banner.show {
    transform: translateY(0);
}
.cookie-banner-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.cookie-banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 22px;
    color: rgba(255, 255, 255, 0.85);
}
.cookie-banner-text a {
    color: #2E3192;
    font-weight: 600;
    text-decoration: underline;
}
.cookie-banner-text a:hover {
    color: #fff;
}
.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.cookie-btn-accept {
    background: #2E3192;
    color: #fff;
}
.cookie-btn-accept:hover {
    background: #3a3fb0;
}
.cookie-btn-settings {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.cookie-btn-settings:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}
.cookie-btn-reject {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.cookie-btn-reject:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Pannello preferenze */
.cookie-preferences {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}
.cookie-preferences.show {
    display: flex;
}
.cookie-pref-panel {
    background: #fff;
    border-radius: 6px;
    max-width: 550px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.cookie-pref-panel h4 {
    color: #1e283c;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
.cookie-pref-panel > p {
    font-size: 14px;
    color: #666;
    line-height: 22px;
    margin-bottom: 25px;
}
.cookie-pref-item {
    padding: 15px 0;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.cookie-pref-item-info {
    flex: 1;
    padding-right: 15px;
}
.cookie-pref-item-info h6 {
    font-size: 15px;
    font-weight: 600;
    color: #1e283c;
    margin-bottom: 4px;
}
.cookie-pref-item-info p {
    font-size: 13px;
    color: #888;
    line-height: 20px;
    margin: 0;
}
/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}
.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #2E3192;
}
.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}
.cookie-toggle input:disabled + .cookie-toggle-slider {
    background: #2E3192;
    opacity: 0.6;
    cursor: default;
}
.cookie-pref-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.cookie-pref-actions .cookie-btn {
    padding: 10px 20px;
}

/* Floating cookie button (stile Iubenda) */
.cookie-float-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: #1e283c;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99998;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    color: #fff;
    font-size: 20px;
    padding: 0;
}
.cookie-float-btn:hover {
    background: #2E3192;
    transform: scale(1.1);
}
.cookie-float-btn.show {
    display: flex;
}

/* Responsive */
@media (max-width: 767px) {
    .cookie-banner-inner {
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }
    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }
    .cookie-btn {
        width: 100%;
    }
    .cookie-pref-panel {
        padding: 25px 20px;
    }
    .cookie-pref-actions {
        flex-direction: column;
    }
}
