/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1.5rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
}

.cookie-banner.show {
    transform: translateY(0);
}

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

.cookie-text {
    flex: 1;
}

.cookie-text h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #667eea;
}

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

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

.cookie-buttons .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Cookie Modal Styles */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.cookie-modal-header h2 {
    margin: 0;
    color: #2d3748;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f7fafc;
    color: #2d3748;
}

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

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

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

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

.cookie-category-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2d3748;
}

.cookie-category p {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Toggle Switch Styles */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    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%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: #667eea;
}

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

.toggle.disabled {
    opacity: 0.6;
}

.toggle.disabled .slider {
    cursor: not-allowed;
    background-color: #48bb78;
}

.cookie-modal-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
}

.cookie-modal-footer .btn {
    padding: 12px 30px;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal {
        padding: 1rem;
    }

    .cookie-modal-content {
        max-height: 90vh;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem;
    }

    .cookie-text h3 {
        font-size: 1.1rem;
    }

    .cookie-text p {
        font-size: 0.9rem;
    }

    .cookie-buttons .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .cookie-modal-header h2 {
        font-size: 1.3rem;
    }

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

    .toggle {
        align-self: flex-end;
    }
}

/* Animation for cookie acceptance */
.cookie-banner.accepting {
    animation: cookieAccept 0.5s ease forwards;
}

@keyframes cookieAccept {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Focus styles for accessibility */
.cookie-buttons .btn:focus,
.close-btn:focus,
.toggle input:focus + .slider {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-banner {
        background: #000;
        border-top: 2px solid #fff;
    }
    
    .cookie-modal-content {
        border: 2px solid #000;
    }
    
    .slider {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal-content,
    .slider,
    .slider:before {
        transition: none;
    }
    
    .cookie-modal-content {
        animation: none;
    }
}
