/* Enhanced Cookie Banner CSS - Lifecycle Leder */

/* Cookie Control Inputs - Hidden but functional */
.cookie-control {
    display: none;
}

/* Cookie Banner Base Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-top: 1px solid var(--light-gray);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

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

.cookie-text h4 {
    margin: 0 0 10px 0;
    color: var(--cobalt);
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-text p {
    margin: 0;
    color: var(--dark-gray);
    line-height: 1.5;
    font-size: 0.95rem;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    align-items: center;
}

.cookie-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    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(--mint);
    color: var(--cobalt);
}

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

.cookie-btn.reject {
    background-color: var(--ash);
    color: var(--white);
}

.cookie-btn.reject:hover {
    background-color: #6B7280;
}

.cookie-btn.customize {
    background-color: transparent;
    color: var(--cobalt);
    border: 1px solid var(--cobalt);
}

.cookie-btn.customize:hover {
    background-color: var(--cobalt);
    color: var(--white);
}

/* Cookie Preferences Panel */
.cookie-preferences {
    border-top: 1px solid var(--light-gray);
    padding: 25px;
    background-color: var(--light-gray);
    transition: all 0.3s ease;
    max-height: 400px;
    overflow-y: auto;
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.cookie-category {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    user-select: none;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: var(--ash);
    border-radius: 24px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--white);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-slider {
    background-color: var(--mint);
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.cookie-toggle input[type="checkbox"]:disabled + .toggle-slider {
    background-color: var(--cobalt);
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-toggle input[type="checkbox"]:disabled + .toggle-slider::before {
    transform: translateX(26px);
}

.category-info {
    flex: 1;
}

.category-info strong {
    display: block;
    color: var(--cobalt);
    font-size: 1rem;
    margin-bottom: 5px;
}

.category-info p {
    margin: 0;
    color: var(--ash);
    font-size: 0.875rem;
    line-height: 1.4;
}

.cookie-preference-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-policy-link {
    color: var(--cobalt);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* Cookie Banner Functionality with Pure CSS */
.cookie-banner.show {
    transform: translateY(0);
}

/* Hide preferences panel by default */
.cookie-preferences {
    display: none;
}

/* Show preferences when customize is checked */
#customize:checked ~ .cookie-banner .cookie-preferences {
    display: block;
}

/* Hide banner when accept-all is checked */
#accept-all:checked ~ .cookie-banner {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

/* Hide banner when reject-all is checked */
#reject-all:checked ~ .cookie-banner {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

/* Hide banner when save-prefs is checked */
#save-prefs:checked ~ .cookie-banner {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

/* Alternative approach - using :target pseudo-class */
.cookie-banner:target {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .cookie-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 100px;
        max-width: 140px;
    }
    
    .cookie-preferences {
        padding: 20px;
    }
    
    .cookie-preference-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .cookie-preference-actions .cookie-btn {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        max-height: 95vh;
    }
    
    .cookie-content {
        padding: 15px;
    }
    
    .cookie-text h4 {
        font-size: 1rem;
    }
    
    .cookie-text p {
        font-size: 0.875rem;
    }
    
    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
        max-width: none;
        padding: 14px 20px;
    }
    
    .cookie-toggle {
        gap: 12px;
    }
    
    .category-info strong {
        font-size: 0.95rem;
    }
    
    .category-info p {
        font-size: 0.8rem;
    }
}