/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e0e0e0;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: slideUp 0.4s ease-out;
    border-top: 3px solid #c8102e;
}

.cookie-consent-banner.cookie-consent-hidden {
    animation: slideDown 0.3s ease-in;
    transform: translateY(100%);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h3 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 1.3rem;
}

.cookie-consent-text p {
    margin: 5px 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.cookie-links {
    margin-top: 10px;
}

.cookie-links a {
    color: #c8102e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.cookie-links a:hover {
    color: #ff1744;
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #c8102e 0%, #a00d25 100%);
    color: #ffffff;
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #a00d25 0%, #c8102e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.4);
}

.cookie-btn-secondary {
    background: transparent;
    color: #e0e0e0;
    border: 2px solid #666;
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #999;
}

/* Modal Styles */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}

.cookie-modal.cookie-modal-hidden {
    animation: fadeOut 0.3s ease;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.cookie-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 10px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid #c8102e;
    animation: slideInModal 0.3s ease;
}

@keyframes slideInModal {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.5rem;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #e0e0e0;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #c8102e;
}

.cookie-modal-body {
    padding: 25px;
}

.cookie-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #444;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.1rem;
}

.cookie-category-description {
    color: #b0b0b0;
    margin: 0;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    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%;
}

input:checked + .cookie-slider {
    background-color: #c8102e;
}

input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #444;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
    }

    .cookie-consent-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .cookie-consent-text h3 {
        font-size: 1.1rem;
    }

    .cookie-consent-text p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 15px;
    }

    .cookie-modal-header h2 {
        font-size: 1.2rem;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Link per riaprire le preferenze nel footer */
.cookie-settings-link {
    color: #c8102e;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s;
}

.cookie-settings-link:hover {
    color: #ff1744;
    text-decoration: underline;
}
