/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(10px);
    color: white;
    padding: 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

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

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

.cookie-banner-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

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

.cookie-banner-text a {
    color: #60a5fa;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-banner-text a:hover {
    color: #93c5fd;
}

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

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

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

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

.cookie-btn-reject {
    background-color: transparent;
    color: #cbd5e1;
    border: 1px solid #475569;
}

.cookie-btn-reject:hover {
    background-color: #475569;
    color: white;
}

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

.cookie-btn-customize:hover {
    background-color: #60a5fa;
    color: white;
}

/* Cookie Customization Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

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

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

.cookie-modal-header {
    padding: 24px 24px 0;
    border-bottom: 1px solid #e2e8f0;
}

.cookie-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.cookie-modal-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 20px;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

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

.cookie-category-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

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

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #0d9488;
}

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

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

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

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

.cookie-category.essential {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

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

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 20px 16px;
    }
    
    .cookie-banner-container {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .cookie-banner-content {
        min-width: auto;
    }
    
    .cookie-banner-actions {
        justify-content: center;
        gap: 8px;
    }
    
    .cookie-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
        padding: 12px 16px;
    }
    
    .cookie-modal {
        padding: 10px;
    }
    
    .cookie-modal-content {
        max-height: 90vh;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 16px 12px;
    }
    
    .cookie-banner-title {
        font-size: 1rem;
    }
    
    .cookie-banner-text {
        font-size: 0.85rem;
    }
    
    .cookie-btn {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
    
    .cookie-modal-title {
        font-size: 1.25rem;
    }
    
    .cookie-category-title {
        font-size: 1rem;
    }
}

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

.cookie-banner.animate {
    animation: slideUp 0.3s ease forwards;
}

/* Focus styles for accessibility */
.cookie-btn:focus,
.cookie-toggle:focus-within,
.cookie-modal-close:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-banner {
        background: #000000;
        border-top: 2px solid #ffffff;
    }
    
    .cookie-btn-accept {
        background-color: #ffffff;
        color: #000000;
    }
    
    .cookie-btn-reject,
    .cookie-btn-customize {
        border-width: 2px;
    }
}

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