/* Cookie Banner Styles - Checkbox-based Implementation */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--accent-color);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: block;
}

/* Hide banner when checkbox is checked */
#cookieBannerToggle:checked ~ #cookieBanner {
    display: none;
}

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

.cookie-text {
    flex: 1;
}

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

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

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cookie-btn.accept {
    background-color: var(--primary-color);
    color: white;
}

.cookie-btn.accept:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.cookie-btn.reject {
    background-color: transparent;
    color: #E2E8F0;
    border: 1px solid #475569;
}

.cookie-btn.reject:hover {
    background-color: #475569;
    color: white;
}

.cookie-btn.customize {
    background-color: #475569;
    color: white;
}

.cookie-btn.customize:hover {
    background-color: #334155;
}

.cookie-link {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.cookie-link:hover {
    color: white;
    text-decoration: underline;
}

/* Cookie Modal - Pure CSS Implementation */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Show modal when checkbox is checked */
#cookieModalToggle:checked ~ #cookieModal {
    display: flex;
}

.cookie-modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-color);
}

.cookie-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748B;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

.cookie-close:hover {
    background-color: #F1F5F9;
}

.cookie-modal-body {
    padding: 1.5rem;
}

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

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

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

.cookie-category-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
}

.cookie-category p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-light);
}

/* Cookie Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    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: #CBD5E1;
    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: var(--primary-color);
}

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

input:disabled + .cookie-slider {
    background-color: var(--primary-color);
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 1.25rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .cookie-text p {
        font-size: 0.875rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cookie-modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1rem;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 0.875rem 1rem;
    }
    
    .cookie-link {
        padding: 0.75rem;
    }
}