/* 
=========================================
Cookie Consent Popup
=========================================
*/

#cookie-consent-popup {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 9999;
    display: none;
}

#cookie-consent-popup.show {
    display: block;
    animation: slide-up 0.4s ease-out;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.cookie-title {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.cookie-icon {
    margin-right: 0.8rem;
    color: #0056b3;
    font-size: 1.5rem;
}

.cookie-title h4 {
    margin: 0;
    font-size: 1.2rem;
}

.cookie-text {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.cookie-text a {
    color: #0056b3;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    justify-content: space-between;
}

.cookie-btn {
    padding: 0.6rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-accept-all {
    background-color: #0056b3;
    color: #fff;
    flex-grow: 1;
    margin-right: 0.5rem;
}

.btn-accept-all:hover {
    background-color: #003d7a;
}

.btn-necessary {
    background-color: transparent;
    border: 1px solid #ddd;
    color: #6c757d;
}

.btn-necessary:hover {
    background-color: #f8f9fa;
}

.btn-settings {
    background-color: transparent;
    border: 1px solid #ddd;
    color: #6c757d;
    margin-left: 0.5rem;
}

.btn-settings:hover {
    background-color: #f8f9fa;
}

/* Cookie Settings Modal */

#cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

#cookie-settings-modal.show {
    display: flex;
    animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-settings-content {
    background-color: #fff;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.settings-header h3 {
    margin: 0;
    color: #0056b3;
}

.close-settings {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-settings:hover {
    color: #343a40;
}

.cookie-type {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.cookie-type:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cookie-category-name {
    font-weight: 600;
    font-size: 1.1rem;
}

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

.toggle-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

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

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

.toggle-checkbox:checked + .toggle-slider {
    background-color: #0056b3;
}

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

.toggle-checkbox[disabled] + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.settings-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn-save-preferences {
    background-color: #0056b3;
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
}

.btn-save-preferences:hover {
    background-color: #003d7a;
}

.btn-accept-all-settings {
    background-color: transparent;
    border: 1px solid #0056b3;
    color: #0056b3;
    padding: 0.6rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-accept-all-settings:hover {
    background-color: #0056b3;
    color: #fff;
}

@media (max-width: 768px) {
    #cookie-consent-popup {
        bottom: 1rem;
        padding: 1.2rem;
    }
    
    .cookie-actions {
        flex-direction: column;
    }
    
    .btn-accept-all {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .btn-settings {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .settings-footer {
        flex-direction: column;
    }
    
    .btn-save-preferences,
    .btn-accept-all-settings {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}