/* Stili per il banner dei cookie */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-family: "Poppins", serif;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-text {
    flex: 1;
    margin-right: 20px;
    font-size: 14px;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.cookie-btn-accept {
    background-color: #e74c3c;
    color: white;
}

.cookie-btn-accept:hover {
    background-color: #c0392b;
}

.cookie-btn-decline {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.cookie-btn-decline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cookie-btn-preferences {
    background-color: transparent;
    color: #FFD700;
    text-decoration: underline;
    padding: 8px 0;
}

.cookie-preferences-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    color: #333;
    display: none;
}

.cookie-preferences-panel h3 {
    margin-top: 0;
    color: #333;
}

.cookie-preference-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cookie-preference-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.preference-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #e74c3c;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.preferences-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
}

/* Media queries per il responsive design */
@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-banner-text {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .cookie-banner-buttons {
        width: 100%;
        justify-content: space-between;
    }
}