/**
 * Cookie Consent Manager Styles
 * GDPR Compliant Cookie Management System
 */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #3b82f6;
}

.cookie-consent-banner.active {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-consent-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #f9fafb;
}

.cookie-consent-message {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    color: #d1d5db;
}

.cookie-consent-message a {
    color: #60a5fa;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-consent-message a:hover {
    color: #93c5fd;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cookie-consent-btn.accept-all {
    background: #3b82f6;
    color: white;
}

.cookie-consent-btn.accept-all:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.cookie-consent-btn.settings {
    background: #6b7280;
    color: white;
}

.cookie-consent-btn.settings:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.cookie-consent-btn.reject {
    background: transparent;
    color: #d1d5db;
    border: 1px solid #4b5563;
}

.cookie-consent-btn.reject:hover {
    background: #374151;
    border-color: #6b7280;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.cookie-settings-modal.active {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-content {
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    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-settings-modal.active .cookie-settings-content {
    transform: scale(1);
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-settings-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.cookie-settings-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.cookie-settings-body {
    padding: 1.5rem;
}

.cookie-settings-description {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cookie-category.required {
    background: #f9fafb;
    border-color: #d1d5db;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

.category-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    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: #3b82f6;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:disabled + .slider {
    background-color: #3b82f6;
    opacity: 0.6;
    cursor: not-allowed;
}

input:disabled + .slider:before {
    transform: translateX(26px);
}

.cookie-settings-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.cookie-settings-save,
.cookie-settings-accept-all {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-settings-save {
    background: #6b7280;
    color: white;
}

.cookie-settings-save:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.cookie-settings-accept-all {
    background: #3b82f6;
    color: white;
}

.cookie-settings-accept-all:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Dark mode support */
.dark .cookie-settings-content {
    background: #1f2937;
    color: #f9fafb;
}

.dark .cookie-settings-header {
    border-bottom-color: #374151;
}

.dark .cookie-settings-title {
    color: #f9fafb;
}

.dark .cookie-settings-close {
    color: #9ca3af;
}

.dark .cookie-settings-close:hover {
    background: #374151;
    color: #f3f4f6;
}

.dark .cookie-settings-description {
    color: #9ca3af;
}

.dark .cookie-category {
    border-color: #374151;
    background: #111827;
}

.dark .cookie-category:hover {
    border-color: #4b5563;
}

.dark .cookie-category.required {
    background: #1f2937;
    border-color: #4b5563;
}

.dark .category-title {
    color: #f9fafb;
}

.dark .category-description {
    color: #9ca3af;
}

.dark .cookie-settings-footer {
    border-top-color: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 0;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
    }
    
    .cookie-consent-btn {
        width: 100%;
        text-align: center;
    }
    
    .cookie-settings-modal {
        padding: 0.5rem;
    }
    
    .cookie-settings-content {
        max-height: 95vh;
    }
    
    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding: 1rem;
    }
    
    .cookie-settings-footer {
        flex-direction: column;
    }
    
    .cookie-settings-save,
    .cookie-settings-accept-all {
        width: 100%;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Animation for banner entrance */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-consent-banner.active {
    animation: slideUp 0.3s ease-out;
}

/* Focus styles for accessibility */
.cookie-consent-btn:focus,
.cookie-settings-save:focus,
.cookie-settings-accept-all:focus,
.cookie-settings-close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.switch input:focus + .slider {
    box-shadow: 0 0 0 2px #3b82f6;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border: 2px solid white;
    }
    
    .cookie-consent-btn {
        border: 2px solid currentColor;
    }
    
    .cookie-category {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-settings-modal,
    .cookie-settings-content,
    .cookie-consent-btn,
    .slider,
    .slider:before {
        transition: none;
    }
    
    .cookie-consent-banner.active {
        animation: none;
    }
}
