/* ============================================
   COOKIE CONSENT BANNER - COMPATTO
   ============================================ */

.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: 500px;
    background: white;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    transform: translateY(100px);
    transition: transform 0.3s ease;
    opacity: 0;
    transition: all 0.3s ease;
}

.cookie-consent-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-consent-content {
    padding: 20px;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cookie-header i {
    font-size: 1.5rem;
    color: #dc3545;
}

.cookie-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cookie-text {
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.cookie-text p {
    margin-bottom: 8px;
}

.cookie-privacy-link {
    color: #dc3545;
    text-decoration: underline;
    cursor: pointer;
}

/* Form raccolta dati compatto */
.user-data-form {
    margin: 12px 0;
    padding: 12px;
    background: #f9fafb;
    border-radius: 12px;
}

.user-data-form h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-row-cookie {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.form-group-cookie input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.form-group-cookie input:focus {
    outline: none;
    border-color: #dc3545;
}

/* Opzioni cookie compatte */
.cookie-options {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    margin: 12px 0;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.cookie-option:first-child {
    padding-top: 0;
}

.cookie-option-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.cookie-option-info p {
    font-size: 0.7rem;
    color: #6b7280;
    margin: 0;
}

/* Toggle più piccolo */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    flex-shrink: 0;
}

.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-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 34px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #dc3545;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #dc3545;
    opacity: 0.6;
}

/* Pulsanti compatti */
.cookie-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-cookie {
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    flex: 1;
    text-align: center;
}

.btn-cookie-primary {
    background: #dc3545;
    color: white;
}

.btn-cookie-primary:hover {
    background: #b02a37;
}

.btn-cookie-secondary {
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
}

.btn-cookie-secondary:hover {
    background: #dc3545;
    color: white;
}

.btn-cookie-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #4b5563;
}

.btn-cookie-outline:hover {
    background: #f3f4f6;
}

/* Modal Privacy compatto */
.privacy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.privacy-modal-content {
    background: white;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 20px;
}

.privacy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.privacy-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #6b7280;
}

.privacy-modal-body {
    color: #4b5563;
    line-height: 1.5;
    font-size: 0.8rem;
}

.privacy-modal-body h4 {
    color: #111827;
    margin: 12px 0 6px;
    font-size: 0.9rem;
}

.privacy-modal-body p {
    margin-bottom: 8px;
}

.cookie-success {
    background: #d1fae5;
    color: #065f46;
    padding: 8px;
    border-radius: 10px;
    margin-top: 12px;
    text-align: center;
    font-size: 0.75rem;
    display: none;
}

/* Responsive */
@media (max-width: 550px) {
    .cookie-consent-banner {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .form-row-cookie {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .btn-cookie {
        padding: 10px;
    }
}

/* Informativa trattamento dati */
.user-data-info {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    margin: 12px 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-left: 3px solid #dc3545;
}

.user-data-info i {
    font-size: 1.2rem;
    color: #dc3545;
    margin-top: 2px;
}

.user-data-info div {
    flex: 1;
}

.user-data-info strong {
    font-size: 0.8rem;
    color: #111827;
    display: block;
    margin-bottom: 6px;
}

.user-data-info ul {
    margin: 0 0 6px 18px;
    padding: 0;
}

.user-data-info li {
    font-size: 0.75rem;
    color: #4b5563;
    line-height: 1.4;
}

.user-data-info small {
    font-size: 0.7rem;
    color: #6b7280;
    display: block;
}