/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 20px;
    display: block;
}

/* Hide banner when any choice is made */
input[name="cookie-choice"]:checked ~ .cookie-banner,
.cookie-banner:has(input[name="cookie-choice"]:checked) {
    display: none;
}

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

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-banner-text a {
    color: #2563EB;
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    display: inline-block;
    position: relative;
}

.cookie-btn input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-btn-primary {
    background-color: #2563EB;
    color: white;
    border-color: #2563EB;
}

.cookie-btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.cookie-btn-secondary {
    background-color: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

.cookie-btn-secondary:hover {
    background-color: #e2e8f0;
    color: #475569;
}

.cookie-btn-outline {
    background-color: transparent;
    color: #2563EB;
    border-color: #2563EB;
}

.cookie-btn-outline:hover {
    background-color: #2563EB;
    color: white;
}

/* Cookie Customizer */
.cookie-customizer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    display: none;
}

/* Show customizer when customize is selected */
#cookie-customize:checked ~ .cookie-customizer,
#cookie-customize-about:checked ~ .cookie-customizer,
#cookie-customize-privacy:checked ~ .cookie-customizer,
#cookie-customize-terms:checked ~ .cookie-customizer,
#cookie-customize-cookies:checked ~ .cookie-customizer {
    display: flex;
}

.cookie-customizer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-customizer-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.cookie-customizer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.cookie-customizer-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.25rem;
}

.cookie-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    position: relative;
}

.cookie-close-btn input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-close-btn:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.cookie-customizer-body {
    padding: 0 24px;
}

.cookie-category {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

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

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cookie-category-info h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 1rem;
}

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

/* Cookie Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.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: #cbd5e1;
    transition: 0.2s;
    border-radius: 24px;
}

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

input:checked + .cookie-slider {
    background-color: #2563EB;
}

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

input:disabled + .cookie-slider {
    background-color: #94a3b8;
    cursor: not-allowed;
}

input:disabled + .cookie-slider:before {
    background-color: #f1f5f9;
}

.cookie-customizer-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Hide customizer when close or save is clicked */
#cookie-customizer-close:checked ~ .cookie-customizer,
#cookie-save-preferences:checked ~ .cookie-customizer,
#cookie-accept-selected:checked ~ .cookie-customizer {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .cookie-banner-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 80px;
    }
    
    .cookie-customizer-overlay {
        padding: 10px;
    }
    
    .cookie-customizer-content {
        max-height: 90vh;
    }
    
    .cookie-customizer-header {
        padding: 20px 20px 0 20px;
    }
    
    .cookie-customizer-body {
        padding: 0 20px;
    }
    
    .cookie-customizer-footer {
        padding: 20px;
        flex-direction: column;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .cookie-switch {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    #cookie-banner {
        padding: 16px;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        padding: 10px 16px;
    }
    
    .cookie-customizer-header {
        padding: 16px 16px 0 16px;
    }
    
    .cookie-customizer-body {
        padding: 0 16px;
    }
    
    .cookie-customizer-footer {
        padding: 16px;
    }
}