/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1e293b;
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

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

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

.cookie-text h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

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

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

.cookie-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Cookie Modal Styles */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

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

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

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

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

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

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

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

.cookie-category-header h4 {
    color: #1f2937;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

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

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

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    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: #1e40af;
}

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

input:disabled + .slider {
    background-color: #1e40af;
    cursor: not-allowed;
    opacity: 0.6;
}

input:disabled + .slider:before {
    transform: translateX(24px);
}

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

/* Responsive Design for Cookie Components */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cookie-buttons {
        justify-content: center;
    }

    .cookie-modal {
        padding: 0.5rem;
    }

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

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1rem;
    }

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

    .cookie-category-header h4 {
        flex: 1;
    }
}

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

    .cookie-text h4 {
        font-size: 1rem;
    }

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

    .cookie-buttons {
        flex-direction: column;
    }

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

    .cookie-modal-header h3 {
        font-size: 1.125rem;
    }

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

    .toggle-switch {
        align-self: flex-start;
    }
}

/* Animation for smooth transitions */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-banner.show {
    animation: slideUp 0.3s ease-out;
}

.cookie-modal.show {
    animation: fadeIn 0.3s ease-out;
}

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

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

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