/* Cookie Banner GDPR - Aciliafotocolor */
/* Integrato con il design esistente del sito */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 3px solid #427fed;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    font-family: inherit;
}

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

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #333333;
}

.cookie-banner-text strong {
    color: #427fed;
    font-weight: 600;
}

.cookie-banner-text a {
    color: #427fed;
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    color: #2c5fcc;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.cookie-btn-accept {
    background-color: #427fed;
    color: white;
}

.cookie-btn-accept:hover {
    background-color: #2c5fcc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 127, 237, 0.3);
}

.cookie-btn-customize {
    background-color: transparent;
    color: #427fed;
    border: 2px solid #427fed;
}

.cookie-btn-customize:hover {
    background-color: #427fed;
    color: white;
}

.cookie-btn-reject {
    background-color: #f8f9fa;
    color: #666666;
    border: 1px solid #dee2e6;
}

.cookie-btn-reject:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Modal Cookie Settings */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.cookie-modal-header h3 {
    margin: 0;
    color: #427fed;
    font-size: 24px;
    font-weight: 600;
}

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background-color: #f8f9fa;
    color: #666;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-category {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-category-title {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

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

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

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

.cookie-toggle input:disabled + .cookie-slider {
    background-color: #6c757d;
    cursor: not-allowed;
}

.cookie-category-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.cookie-modal-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Privacy Badge */
.cookie-privacy-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    background: #427fed;
    color: white;
    padding: 12px 16px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(66, 127, 237, 0.3);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    display: none;
}

.cookie-privacy-badge.show {
    display: block;
}

.cookie-privacy-badge:hover {
    background-color: #2c5fcc;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 127, 237, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .cookie-banner-actions {
        flex-direction: column;
        gap: 8px;
    }

    .cookie-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .cookie-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .cookie-modal-header {
        padding: 20px 20px 16px;
    }

    .cookie-modal-body {
        padding: 20px;
    }

    .cookie-modal-footer {
        padding: 16px 20px 20px;
        flex-direction: column;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cookie-privacy-badge {
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        text-align: center;
    }
}

/* Animation for smooth appearance */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner.animate {
    animation: slideUp 0.4s ease-out;
}

/* Compliance indicator */
.gdpr-compliant {
    font-size: 12px;
    color: #28a745;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gdpr-compliant::before {
    content: "✓";
    font-weight: bold;
}