/* Interactive Assistant - Spezifische Fixes für Darstellungsprobleme */

/* Fix für z-index Probleme */
.interactive-assistant-wrapper {
    position: relative;
    z-index: 1;
}

.assistant-container {
    position: relative;
    z-index: 2;
}

/* Fix für Elementor-Konflikte */
.elementor-widget-interactive_assistant .interactive-assistant-wrapper {
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

.elementor-widget-interactive_assistant .assistant-container {
    width: 100% !important;
    max-width: none !important;
}

/* Fix für WordPress Admin Bar */
.admin-bar .interactive-assistant-wrapper {
    margin-top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .interactive-assistant-wrapper {
        margin-top: 46px;
    }
}

/* Fix für Theme-Konflikte */
body .interactive-assistant-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

body .assistant-container {
    background: rgba(255, 255, 255, 0.85) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12) !important;
}

/* Fix für Option Cards */
.option-card {
    position: relative !important;
    z-index: 1 !important;
    background: #ffffff !important;
    border: 2px solid #f0f0f0 !important;
    border-radius: 15px !important;
    padding: 30px 25px !important;
    margin: 0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.option-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15) !important;
    border-color: #667eea !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%) !important;
}

/* Fix für Animation-Probleme */
.fade-out {
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease-out !important;
}

.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.5s ease-out !important;
}

/* Fix für Touch-Geräte */
@media (hover: none) and (pointer: coarse) {
    .option-card:hover {
        transform: none !important;
    }
    
    .option-card:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
}

/* Fix für Safari */
@supports (-webkit-appearance: none) {
    .assistant-container {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .option-card {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Fix für Firefox */
@-moz-document url-prefix() {
    .assistant-container {
        transform: translateZ(0);
    }
    
    .option-card {
        transform: translateZ(0);
    }
}

/* Fix für Internet Explorer */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .assistant-container {
        display: block;
    }
    
    .options-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 25px;
    }
    
    .option-card {
        flex: 1 1 280px;
        min-width: 280px;
    }
}

/* Fix für Grid-Layout Probleme */
.options-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    width: 100% !important;
}

/* Fix für Flexbox-Probleme */
.assistant-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-height: 400px !important;
}

.welcome-message {
    flex-shrink: 0 !important;
}

.options-grid {
    flex-grow: 1 !important;
}

/* Fix für Text-Rendering */
.assistant-title,
.assistant-subtitle,
.option-title,
.option-description {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* Fix für Icon-Darstellung */
.option-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    font-size: 3.5em !important;
    margin: 0 auto 20px !important;
    position: relative !important;
    width: 80px !important;
    height: 80px !important;
    border: 3px solid #667eea !important;
    border-radius: 50% !important;
    background: rgba(102, 126, 234, 0.05) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15) !important;
    transition: all 0.3s ease !important;
}

.option-card:hover .option-icon {
    background: rgba(102, 126, 234, 0.1) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25) !important;
    border-color: #5a67d8 !important;
}

/* Fix für Button-Styles */
.nav-button {
    display: inline-block !important;
    padding: 14px 28px !important;
    border: none !important;
    border-radius: 25px !important;
    font-size: 1em !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    min-width: 120px !important;
    text-align: center !important;
}

.nav-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
    text-decoration: none !important;
}

.nav-button.back {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%) !important;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3) !important;
}

.nav-button.back:hover {
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.4) !important;
}

/* Fix für Progress Bar */
.progress-bar {
    width: 100% !important;
    height: 6px !important;
    background: #e0e0e0 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    flex-grow: 1 !important;
}

.progress-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
    width: 0% !important;
    transition: width 0.5s ease !important;
    border-radius: 3px !important;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3) !important;
}

/* Fix für Navigation Buttons Container */
.navigation-buttons {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 40px !important;
    padding: 20px 0 !important;
    border-top: 1px solid #f0f0f0 !important;
    width: 100% !important;
}

/* Fix für Header */
.assistant-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 30px !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 120px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.assistant-avatar {
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto 20px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 60px !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Fix für Responsive Design */
@media (max-width: 768px) {
    .interactive-assistant-wrapper {
        margin: 10px !important;
    }
    
    .assistant-container {
        border-radius: 15px !important;
        margin: 0 !important;
    }
    
    .assistant-header {
        padding: 25px 20px !important;
        min-height: 100px !important;
    }
    
    .assistant-avatar {
        width: 80px !important;
        height: 80px !important;
        font-size: 40px !important;
        margin-bottom: 15px !important;
    }
    
    .assistant-title {
        font-size: 1.8em !important;
    }
    
    .assistant-content {
        padding: 25px 20px !important;
        min-height: 350px !important;
    }
    
    .options-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .option-card {
        padding: 25px 20px !important;
        min-height: 160px !important;
    }
    
    .option-icon {
        font-size: 2.5em !important;
        width: 70px !important;
        height: 70px !important;
        margin: 0 auto 15px !important;
    }
    
    .navigation-buttons {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .nav-button {
        width: 100% !important;
        max-width: 200px !important;
    }
    
    .progress-bar {
        margin: 0 !important;
        order: -1 !important;
    }
}

@media (max-width: 480px) {
    .assistant-header {
        padding: 20px 15px !important;
    }
    
    .assistant-avatar {
        width: 70px !important;
        height: 70px !important;
        font-size: 35px !important;
    }
    
    .assistant-title {
        font-size: 1.6em !important;
    }
    
    .assistant-content {
        padding: 20px 15px !important;
    }
    
    .option-card {
        padding: 20px 15px !important;
    }
    
    .option-icon {
        font-size: 2.2em !important;
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto 15px !important;
    }
}

/* Fix für Print */
@media print {
    .interactive-assistant-wrapper {
        display: none !important;
    }
}

/* Fix für Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .assistant-container,
    .option-card,
    .assistant-avatar,
    .nav-button,
    .progress-fill {
        animation: none !important;
        transition: none !important;
    }
    
    .option-card:hover {
        transform: none !important;
    }
    
    .fade-out,
    .fade-in {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Fix für High Contrast */
@media (prefers-contrast: high) {
    .assistant-container {
        border: 2px solid #000 !important;
        background: #ffffff !important;
    }
    
    .option-card {
        border: 2px solid #000 !important;
        background: #ffffff !important;
    }
    
    .option-card:hover {
        background: #f0f0f0 !important;
    }
    
    .assistant-header {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Fix für Dark Mode */
@media (prefers-color-scheme: dark) {
    .assistant-container {
        background: rgba(30, 30, 30, 0.98) !important;
        color: #fff !important;
    }
    
    .option-card {
        background: rgba(50, 50, 50, 0.9) !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    
    .option-card:hover {
        background: rgba(70, 70, 70, 0.9) !important;
    }
    
    .assistant-content {
        background: rgba(30, 30, 30, 0.98) !important;
    }
    
    .welcome-message h2 {
        color: #fff !important;
    }
    
    .welcome-message p {
        color: #ccc !important;
    }
    
    .option-title {
        color: #fff !important;
    }
    
    .option-description {
        color: #ccc !important;
    }
}

/* Fix für Focus States */
.assistant-container:focus-within {
    outline: 3px solid #667eea !important;
    outline-offset: 2px !important;
}

.option-card:focus {
    outline: 3px solid #667eea !important;
    outline-offset: 2px !important;
}

.nav-button:focus {
    outline: 3px solid #667eea !important;
    outline-offset: 2px !important;
}

/* Fix für Screen Reader */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Fix für Loading States */
.loading {
    display: inline-block !important;
    width: 24px !important;
    height: 24px !important;
    border: 3px solid rgba(255,255,255,.3) !important;
    border-radius: 50% !important;
    border-top-color: #fff !important;
    animation: spin 1s ease-in-out infinite !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fix für Success Animation */
.success-checkmark {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    display: block !important;
    stroke-width: 2 !important;
    stroke: #667eea !important;
    stroke-miterlimit: 10 !important;
    margin: 10% auto !important;
    box-shadow: inset 0px 0px 0px #667eea !important;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both !important;
}

.success-checkmark__circle {
    stroke-dasharray: 166 !important;
    stroke-dashoffset: 166 !important;
    stroke-width: 2 !important;
    stroke-miterlimit: 10 !important;
    stroke: #667eea !important;
    fill: none !important;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards !important;
}

.success-checkmark__check {
    transform-origin: 50% 50% !important;
    stroke-dasharray: 48 !important;
    stroke-dashoffset: 48 !important;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards !important;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0 !important;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none !important;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1) !important;
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #667eea !important;
    }
}
