/* 
 * AutoExpert - Cookie Consent Stylesheet
 * Author: AutoExpert Team
 * Version: 1.0.0
 */

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 32, 44, 0.95);
    color: #ffffff;
    z-index: 9999;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: none;
}

.cookie-consent.show {
    display: block;
    animation: slideUp 0.4s forwards;
}

.cookie-consent.hide {
    animation: slideDown 0.4s forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

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

.cookie-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
}

#cookie-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#cookie-close:hover {
    opacity: 1;
}

.cookie-content p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.cookie-settings-toggle {
    margin-bottom: 1rem;
}

#cookie-settings-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

#cookie-settings-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cookie-settings {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out, margin 0.3s ease-out;
}

.cookie-settings.open {
    max-height: 600px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cookie-option {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.cookie-option label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    cursor: pointer;
}

.cookie-option p {
    margin-left: 1.7rem;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

#accept-all,
#accept-necessary,
#save-preferences {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#accept-all {
    background-color: #3a6ea5;
    color: #ffffff;
}

#accept-all:hover {
    background-color: #2c5282;
}

#accept-necessary,
#save-preferences {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

#accept-necessary:hover,
#save-preferences:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Custom Checkbox Styling */
.cookie-option input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0;
    width: 1.2rem;
    height: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    display: grid;
    place-content: center;
    cursor: pointer;
}

.cookie-option input[type="checkbox"]::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    transform: scale(0);
    transition: transform 0.1s ease-in-out;
    background-color: #3a6ea5;
    border-radius: 2px;
}

.cookie-option input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.cookie-option input[type="checkbox"]:checked {
    background-color: #ffffff;
    border-color: #ffffff;
}

.cookie-option input[type="checkbox"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cookie-buttons {
        flex-direction: column;
    }
    
    #accept-all,
    #accept-necessary,
    #save-preferences {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .cookie-content {
        padding: 1rem;
    }
    
    .cookie-header h3 {
        font-size: 1.1rem;
    }
    
    .cookie-settings.open {
        max-height: 800px;
    }
}
