/* Styles spezifisch für den AI Assistant - v1.2 */

/* Container */
.ai-assistant-section {
    padding: 30px 0;
    background: rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-assistant-box {
    background: linear-gradient(135deg, rgba(0, 40, 80, 0.85) 0%, rgba(0, 20, 60, 0.95) 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.ai-assistant-box h2,
.ai-assistant-box h3 {
    color: white;
    text-align: center;
}
.ai-assistant-box h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}
.ai-assistant-box h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}
/* Entferne den Unterstrich von Section Titles innerhalb der AI Box */
.ai-assistant-box .section-title::after {
    display: none;
}


.ai-assistant-intro-container {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap; /* Umbruch auf kleineren Bildschirmen */
}

.ai-info {
    flex: 1;
    min-width: 250px; /* Mindestbreite für Umbruch */
}
.ai-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.ai-features {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.ai-features li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: flex-start; /* Besser für längere Texte */
}

.ai-features li i {
    color: var(--accent-color);
    margin-right: 10px;
    font-size: 1rem;
    margin-top: 0.2em; /* Icon vertikal ausrichten */
}

.ai-cta {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.ai-cta-image {
    max-width: 180px; /* Etwas kleiner */
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.ai-cta-image:hover {
    transform: scale(1.03);
}

/* AI Chat Box Innen */
.ai-box {
    background: rgba(0, 30, 60, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px;
    color: white;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Anfangs versteckt, wird durch JS gesteuert */
    display: none;
    opacity: 0;
    transform: translateY(10px);
}
.ai-box.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Formular */
.ai-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.ai-select, .ai-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    color: white !important; /* Sicherstellen, dass Text weiß ist */
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ai-select:focus, .ai-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25);
    background: rgba(0, 0, 0, 0.3);
}

.ai-select option {
    background: #001e3c !important; /* Wichtig für Sichtbarkeit */
    color: white !important;
}

/* Buttons */
.ai-button, .ai-toggle-button, .follow-up-button {
    background: var(--accent-color);
    color: #000 !important; /* Wichtig für Kontrast */
    text-shadow: none !important; /* Kein Schatten auf Buttons */
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ai-button:hover:not(:disabled),
.ai-toggle-button:hover,
.follow-up-button:hover {
    background: var(--gold-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Send Button Specific */
#sendButton {
    width: 100%;
    margin-top: 5px;
    /* Inaktives Styling */
    background-color: #FFE082 !important;
    opacity: 0.7;
}
#sendButton.active {
    /* Aktives Styling */
    background-color: var(--accent-color) !important;
    opacity: 1;
}
#sendButton:disabled {
    /* Explizites Disabled Styling */
    background-color: #FFE082 !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}


/* Antwort/Frage Boxen */
.question-box, .response-box {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    color: white;
    max-height: 350px; /* Etwas mehr Platz */
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* WICHTIG: Überschreibt die weiße Textfarbe der response-box für AI-Antworten */
.response-box {
    color: #000000 !important; /* Schwarze Textfarbe für die gesamte response-box */
    background: rgba(255, 255, 255, 0.95) !important; /* Weißer Hintergrund für bessere Lesbarkeit */
}

.question-box {
    border-left: 3px solid var(--accent-color);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}
.question-box .question-header { /* Styling für "Your question:" */
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: var(--accent-color);
}


.response-box .placeholder-text {
    color: rgba(128, 128, 128, 0.7) !important; /* Grauer Text für Placeholder */
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.response-box .answer-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: #4a90e2 !important; /* Blaue Farbe für Header */
    font-size: 1rem;
}

.response-box .response-text p {
    margin-bottom: 1em;
    line-height: 1.7;
    font-size: 0.95rem; /* Standardgröße wie bei feature-info p im Desktop */
    color: #000000 !important; /* Schwarze Textfarbe für AI-Antworten */
}
.response-box .response-text ul {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 1em;
    color: #000000 !important; /* Schwarze Textfarbe für Listen */
}
.response-box .response-text li {
    margin-bottom: 0.5em;
    line-height: 1.6;
    font-size: 0.95rem; /* Standardgröße wie bei feature-info p im Desktop */
    color: #000000 !important; /* Schwarze Textfarbe für AI-Antworten */
}
.response-box .response-text a {
    color: var(--accent-color) !important; /* Gelbe Links */
    text-decoration: underline;
}
.response-box .response-text strong {
    color: #000000 !important; /* Schwarze Textfarbe auch für fetten Text */
    font-weight: 600; /* Slightly bolder */
}
.response-box .response-text em {
    font-style: italic;
    color: #000000 !important; /* Schwarze Textfarbe für kursiven Text */
}

/* Generelle Regel für alle response-text Inhalte - HÖCHSTE PRIORITÄT */
.response-box .response-text {
    color: #000000 !important; /* Schwarze Textfarbe für die gesamte AI-Antwort */
}

/* Zusätzliche Sicherheitsregel - überschreibt alles andere */
.response-box * {
    color: #000000 !important; /* Alle Elemente in der response-box werden schwarz */
}

/* Ausnahmen für spezielle Elemente */
.response-box .answer-header {
    color: #4a90e2 !important; /* Header bleibt blau */
}

.response-box .response-text a {
    color: var(--accent-color) !important; /* Links bleiben gelb */
}

/* Warteanimation / Suchnachricht */
.search-container {
    margin-top: 20px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
    min-height: 50px; /* Sicherstellen, dass Platz für Animation ist */
}

#searchMessage {
    position: relative;
    height: 40px; /* Höhe an Schriftgröße anpassen */
    overflow: hidden; /* Wichtig für Typewriter */
    background: transparent !important;
    color: transparent !important; /* Text unsichtbar machen, nur ::before zeigt ihn */
    font-size: 1.2rem; /* Kleinere Schriftgröße */
    width: 100%;
    margin: 0 auto;
    line-height: 40px;
    display: block; /* Sicherstellen, dass es block ist */
}

#searchMessage::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 100%;
    height: 100%;
    color: white !important;
    text-align: center; /* Zentriert den Text */
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid white;
    background: transparent;
    font-weight: normal;
    box-sizing: border-box;
    animation: typewriter-search 4s steps(30) infinite, blink-cursor-search 1s step-end infinite;
}

/* Spezifische Animationen für die Suchleiste */
@keyframes typewriter-search {
    0% { width: 0; border-right-color: white; } /* Start mit sichtbarem Cursor */
    50% { width: auto; max-width: 100%; border-right-color: white; } /* Lässt Breite automatisch anpassen */
    55% { width: auto; max-width: 100%; border-right-color: white; } /* Hält kurz an */
    99.9% { border-right-color: white; } /* Cursor bleibt bis zum Ende */
    100% { width: 0; border-right-color: transparent; } /* Cursor verschwindet beim Reset */
}

@keyframes blink-cursor-search {
    from, to { border-right-color: white; }
    50% { border-right-color: transparent; }
}


/* Disclaimer */
.ai-disclaimer {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.4;
    text-align: justify;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Follow-Up */
.follow-up-section {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}
/* Styling für Antworten, die aus Follow-Up resultieren */
.follow-up-response .question-box {
     background: rgba(0, 0, 0, 0.25);
     border-left-color: #ffeb3b; /* Leicht anderes Gelb */
}
.follow-up-response .answer-header {
    color: #ffeb3b;
}


.follow-up-input {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    color: white !important; /* Wichtig */
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.follow-up-input:focus {
    outline: none;
    border-color: #ffeb3b;
    box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.25);
    background: rgba(0, 0, 0, 0.3);
}

.follow-up-button {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-top: 5px;
    background-color: #ffeb3b; /* Leicht anderes Gelb */
}
.follow-up-button:hover {
    background-color: #fdd835;
}


/* Mobile Overrides für AI-Elemente */
@media (max-width: 768px) {
    .ai-assistant-section { padding: 20px 0; }
    .ai-assistant-box { padding: 15px; }
    .ai-box { padding: 15px; }
    .ai-assistant-intro-container { display: block; } /* Untereinander auf Mobile */
    .ai-cta { margin-top: 20px; }
    .ai-cta-image { max-width: 140px; }
    .ai-select, .ai-input { padding: 8px 10px; font-size: 0.9rem; }
    .ai-button, .ai-toggle-button, .follow-up-button { padding: 8px 15px; font-size: 0.9rem; }
    .question-box, .response-box { padding: 10px; max-height: 280px; font-size: 0.9rem;}
    #searchMessage { font-size: 1rem; height: 30px; line-height: 30px;}
    .ai-disclaimer { font-size: 0.75rem; padding: 10px;}
    .follow-up-input { font-size: 0.9rem;}
    .follow-up-button { padding: 6px 12px; font-size: 0.85rem;}
} 