/* Cookie Banner Styles */

/* Hidden inputs for controlling banner state */
.cookie-control {
    display: none;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: #e5e7eb;
    padding: 1rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

/* Hide banner when accept or reject is checked */
#accept-cookies:checked ~ .cookie-banner,
#reject-cookies:checked ~ .cookie-banner {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.cookie-text a {
    color: #f59e0b;
    text-decoration: none;
}

.cookie-text a:hover {
    text-decoration: underline;
}

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

.cookie-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.cookie-btn.accept {
    background: #166564;
    color: white;
}

.cookie-btn.accept:hover {
    background: #134e4d;
}

.cookie-btn.reject {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid #6b7280;
}

.cookie-btn.reject:hover {
    background: #374151;
}

.cookie-btn.customize {
    background: transparent;
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.cookie-btn.customize:hover {
    background: #f59e0b;
    color: #1f2937;
}

/* Cookie Preferences Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Show modal when customize toggle is checked */
#customize-toggle:checked ~ .cookie-modal {
    opacity: 1;
    pointer-events: all;
}

.cookie-modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-modal h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1f2937;
}

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

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

.cookie-category h4 {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1rem;
}

.cookie-category p {
    margin: 0 0 0.75rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.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: #ccc;
    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: #166564;
}

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

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

.cookie-modal-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.cookie-modal-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.cookie-modal-btn.save {
    background: #166564;
    color: white;
}

.cookie-modal-btn.save:hover {
    background: #134e4d;
}

.cookie-modal-btn.cancel {
    background: #6b7280;
    color: white;
}

.cookie-modal-btn.cancel:hover {
    background: #4b5563;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cookie-text {
        min-width: auto;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .cookie-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .cookie-modal-buttons {
        flex-direction: column;
    }
    
    .cookie-modal-btn,
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}