/* assets/cookie-manager/css/cookie-manager.css */

/* Banner dei cookie */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(100%);
    animation: slideUp 0.5s forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.cookie-banner-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text p {
    margin: 0;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: #1e40af;
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Modal di personalizzazione */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.cookie-modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.cookie-modal-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #64748b;
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-category-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
}

.cookie-category p {
    margin: 0.5rem 0 0 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #1e40af;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Pulsanti */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #1e40af;
    color: white;
}

.btn-primary:hover {
    background-color: #1e3a8a;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.btn-outline:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-banner-actions {
        justify-content: center;
    }
    
    .cookie-modal-content {
        width: 95%;
        margin: 10px;
    }
}