/**
 * Cookie Consent Banner Styling
 * Aurora Theme Design für XR Human Talent
 * Responsive für Mobile & Desktop
 */

/* ============================================
   COOKIE BANNER - MAIN CONTAINER
   ============================================ */

#cookieConsentBanner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    z-index: 9999;
    opacity: 0;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

#cookieConsentBanner.show {
    bottom: 0;
    opacity: 1;
    pointer-events: all;
}

/* Banner-Wrapper mit Aurora-Glassmorphism */
.cookie-banner-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

/* Aurora-Gradient-Akzent am oberen Rand */
.cookie-banner-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(175, 109, 255, 0.8) 0%, 
        rgba(255, 100, 180, 0.8) 33%,
        rgba(255, 235, 170, 0.8) 66%,
        rgba(120, 190, 255, 0.8) 100%
    );
}

/* Container für Inhalt */
.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* ============================================
   COOKIE BANNER - TEXT & INFO
   ============================================ */

.cookie-banner-text {
    flex: 1;
    min-width: 0;
}

.cookie-banner-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-banner-title i {
    color: #af6dff;
    font-size: 1.25rem;
}

.cookie-banner-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #64748b;
    margin: 0;
}

.cookie-banner-description a {
    color: #af6dff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-banner-description a:hover {
    color: #9333ea;
    text-decoration: underline;
}

/* ============================================
   COOKIE BANNER - BUTTONS
   ============================================ */

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Primärer Button - Aurora-Gradient */
.cookie-btn-primary {
    background: linear-gradient(135deg, #af6dff 0%, #9333ea 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(175, 109, 255, 0.3);
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(175, 109, 255, 0.4);
    transform: translateY(-1px);
}

.cookie-btn-primary:active {
    transform: translateY(0);
}

/* Sekundärer Button */
.cookie-btn-secondary {
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cookie-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Tertiary Button - Text */
.cookie-btn-text {
    background: transparent;
    color: #64748b;
    padding: 0.625rem 1rem;
}

.cookie-btn-text:hover {
    background: rgba(175, 109, 255, 0.05);
    color: #af6dff;
}

/* ============================================
   COOKIE SETTINGS PANEL
   ============================================ */

#cookieSettings {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#cookieSettings.show {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

/* Settings Overlay - Separates Element */
.cookie-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-settings-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* Settings Header */
.cookie-settings-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, 
        rgba(175, 109, 255, 0.03) 0%, 
        rgba(255, 235, 170, 0.03) 100%
    );
}

.cookie-settings-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-settings-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.cookie-settings-close:hover {
    color: #475569;
}

/* Settings Body - Scrollable */
.cookie-settings-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-settings-intro {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Cookie Category */
.cookie-category {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: rgba(175, 109, 255, 0.3);
    background: rgba(175, 109, 255, 0.02);
}

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

.cookie-category-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-category-title i {
    color: #af6dff;
    font-size: 1.125rem;
}

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

.cookie-category-required {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    background: #f1f5f9;
    border-radius: 0.25rem;
}

/* ============================================
   TOGGLE SWITCH - Aurora Design
   ============================================ */

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

.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: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, #af6dff 0%, #9333ea 100%);
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   SETTINGS FOOTER
   ============================================ */

.cookie-settings-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .cookie-banner-wrapper {
        padding: 1.25rem 1rem;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    .cookie-banner-title {
        font-size: 1rem;
    }
    
    .cookie-banner-description {
        font-size: 0.8125rem;
    }
    
    /* Settings Panel auf Mobile */
    #cookieSettings {
        width: 95%;
        max-height: 90vh;
        border-radius: 0.75rem;
    }
    
    .cookie-settings-header {
        padding: 1.25rem 1rem;
    }
    
    .cookie-settings-header h3 {
        font-size: 1.125rem;
    }
    
    .cookie-settings-body {
        padding: 1rem;
    }
    
    .cookie-settings-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .cookie-settings-footer .cookie-btn {
        width: 100%;
    }
    
    .cookie-category {
        padding: 0.875rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* ============================================
   ACCESSIBILITY
   ============================================ */

.cookie-btn:focus,
.cookie-toggle input:focus + .cookie-toggle-slider,
.cookie-settings-close:focus {
    outline: 2px solid #af6dff;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cookie-banner-wrapper {
        background: white;
        border-top: 2px solid #000;
    }
    
    .cookie-btn-primary {
        background: #000;
        color: #fff;
    }
    
    .cookie-btn-secondary {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    #cookieConsentBanner,
    #cookieSettings,
    .cookie-btn,
    .cookie-toggle-slider,
    .cookie-toggle-slider:before {
        transition: none;
    }
}

/* ============================================
   PRINT - Banner ausblenden
   ============================================ */

@media print {
    #cookieConsentBanner,
    #cookieSettings {
        display: none !important;
    }
}
