/* Cookie Banner Styles */

/* Hide cookie control inputs */
.cookie-control {
    display: none;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #222831;
    color: #E7E5E4;
    padding: 1.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: block;
    border-top: 3px solid #00C2C7;
}

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

.cookie-text { 
    flex: 1;
    max-width: 600px;
}

.cookie-text p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #E7E5E4;
}

.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-accept, .cookie-reject, .cookie-customize {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    white-space: nowrap;
    min-width: 100px;
    display: inline-block;
}

.cookie-accept {
    background-color: #00C2C7;
    color: white;
}

.cookie-accept:hover {
    background-color: #009ca0;
}

.cookie-reject {
    background-color: transparent;
    color: #E7E5E4;
    border: 2px solid #E7E5E4;
}

.cookie-reject:hover {
    background-color: #E7E5E4;
    color: #222831;
}

.cookie-customize {
    background-color: transparent;
    color: #00C2C7;
    border: 2px solid #00C2C7;
}

.cookie-customize:hover {
    background-color: #00C2C7;
    color: white;
}

.cookie-policy-link {
    color: #00C2C7;
    text-decoration: underline;
    font-size: 1rem;
    white-space: nowrap;
    margin-left: 1rem;
}

/* Cookie banner hide functionality */
#accept-cookies:checked ~ #cookieBanner,
#reject-cookies:checked ~ #cookieBanner {
    display: none !important;
}

/* Cookie settings modal show functionality */
#show-settings:checked ~ #cookieSettings {
    display: flex !important;
}

#close-settings:checked ~ #cookieSettings {
    display: none !important;
}

.cookie-policy-link:hover {
    color: #009ca0;
}

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

.cookie-settings-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #E7E5E4;
}

.cookie-settings-header h3 {
    color: #222831;
    margin: 0;
}

.close-settings {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-settings:hover {
    color: #222831;
}

.cookie-settings-body {
    padding: 2rem;
}

.cookie-category {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid #E7E5E4;
    border-radius: 8px;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

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

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

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

input:checked + .slider {
    background-color: #00C2C7;
}

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

input:disabled + .slider {
    background-color: #00C2C7;
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-category-header > div {
    flex: 1;
}

.cookie-category-header h4 {
    color: #222831;
    margin-bottom: 0.5rem;
}

.cookie-category-header p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-settings-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #E7E5E4;
    text-align: center;
}

.save-preferences {
    background-color: #00C2C7;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
}

.save-preferences:hover {
    background-color: #009ca0;
}

/* Responsive Design for Cookie Banner */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }
    
    .cookie-settings-content {
        width: 95%;
        margin: 1rem;
    }
    
    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding: 1rem;
    }
    
    .cookie-category {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .cookie-accept, .cookie-reject, .cookie-customize {
        width: 100%;
        padding: 0.875rem 1rem;
    }
    
    .cookie-policy-link {
        margin: 0.5rem 0 0 0;
        display: block;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-switch {
        align-self: center;
    }
}