/* General Styles */
html, body {
    height: 100%;
    overflow: hidden;
}

/* Bessere Lesbarkeit im Dark Mode */
body {
    color: rgba(255, 255, 255, 0.95);
}

/* Formulare besser lesbar machen */
.form-control, .form-control:focus {
    background-color: rgba(30, 30, 30, 0.8);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(80, 80, 80, 0.5);
}

/* Mehrzeiliges Eingabefeld für Nachrichten */
#message-input {
    resize: none;        /* Deaktiviert das manuelle Größenändern */
    overflow-y: auto;    /* Scrollbar nur wenn nötig */
    line-height: 1.5;    /* Bessere Lesbarkeit */
    min-height: 60px;    /* Mindesthöhe festlegen */
    transition: height 0.1s ease-in-out;
}

/* Chat-Eingabe-Bereich anpassen */
.input-group {
    align-items: flex-end; /* Richtet Button am unteren Rand aus */
}

/* Bessere Markierung des aktiven Textarea */
#message-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Admin-Seite spezifische Styles */
.card {
    background-color: rgba(35, 35, 35, 0.8);
    border-color: rgba(80, 80, 80, 0.5);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.list-group-item {
    background-color: rgba(40, 40, 40, 0.8);
    border-color: rgba(80, 80, 80, 0.5);
}

/* Chat message styles */
.message {
    margin-bottom: 1.5rem;
    max-width: 85%;
    position: relative;
}

.user-message {
    margin-left: auto;
    text-align: right;
}

.user-message .message-content {
    background-color: var(--bs-primary);
    color: white;
    border-radius: 1rem 1rem 0.25rem 1rem;
    padding: 1rem;
    display: inline-block;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.assistant-message {
    margin-right: auto;
}

.assistant-message .message-content {
    background-color: var(--bs-dark);
    color: white;
    border-radius: 1rem 1rem 1rem 0.25rem;
    padding: 1rem;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Styling für die Aktionen an Nachrichtenblasen */
.message-actions {
    opacity: 0.8;
    transition: opacity 0.3s ease;
    margin-top: 0.5rem;
}

.message-content:hover .message-actions {
    opacity: 1;
}

/* Styling für Info Modal Dokumentenliste */
#document-list {
    font-size: 0.85rem;
}

.error-message {
    margin-right: auto;
}

.error-message .message-content {
    background-color: var(--bs-danger);
    color: white;
    border-radius: 1rem;
    padding: 1rem;
    display: inline-block;
}

/* Welcome message styling */
.welcome-message {
    margin-bottom: 2rem;
}

/* Make sure paragraphs in messages have proper spacing */
.message-content p {
    margin-bottom: 0.5rem;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Custom scrollbar for chat messages */
#chat-messages::-webkit-scrollbar {
    width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Eltviller Modell Styling */
.time-horizons {
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(45, 45, 45, 0.6);
    border-left: 4px solid var(--bs-primary);
    margin: 15px 0;
}

.horizon-badge {
    display: flex;
    align-items: center;
}

.horizon-badge .badge {
    font-size: 0.8rem;
    padding: 6px 10px;
    min-width: 100px;
    text-align: center;
}

/* Anpassungen für die Horizonte des FMG 4-Horizonte-Modells */
:root {
    /* FMG 4-Horizonte-Modell (entsprechend dem Bild) */
    --horizon0-color: #0a1930;  /* Dunkelblau/Navy - Tagesgeschäft */
    --horizon1-color: #334966;  /* Mittleres Blau - Heutiges Kerngeschäft */
    --horizon2-color: #7d8597;  /* Helleres Blau/Grau - Morgiges Kerngeschäft */
    --horizon3-color: #c9cdd6;  /* Helles Grau - Übermorgiges Geschäft */
    
    /* Alte Eltviller Modell Farben (für Kompatibilität) */
    --eltviller-operative: #b8c6d0;  /* Helles Blaugrau */
    --eltviller-strategic: #2a4b8b;  /* Dunkles Blau */
    --eltviller-visionary: #00b0c8;  /* Türkis/Cyan */
    
    /* Zukunftsbrillen Farben */
    --zukunftsbrille-geplante: #732987;      /* Lila/Violett */
    --zukunftsbrille-wahrscheinliche: #2a4b8b; /* Dunkelblau */
    --zukunftsbrille-erstrebte: #c4aa00;      /* Goldgelb */
    --zukunftsbrille-ueberraschende: #9a0d36; /* Weinrot */
    --zukunftsbrille-gestaltbare: #508d11;    /* Grün */
}

.perspective-operative,
.badge-operative {
    background-color: var(--eltviller-operative) !important;
    color: #333 !important; /* Dunkler Text für besseren Kontrast auf hellem Hintergrund */
}

.perspective-strategic,
.badge-strategic {
    background-color: var(--eltviller-strategic) !important;
}

.perspective-visionary,
.badge-visionary {
    background-color: var(--eltviller-visionary) !important;
}

/* Styling für die Zeithorizonte innerhalb der Antworttexte */
.time-perspective {
    display: block;
    padding: 6px 12px;
    margin: 10px 0;
    font-weight: 500;
    border-left: 4px solid;
    border-radius: 0 4px 4px 0;
}

.time-perspective.horizon0 {
    border-color: var(--horizon0-color);
    background-color: rgba(10, 25, 48, 0.15); 
    color: #fff;
}

.time-perspective.horizon1 {
    border-color: var(--horizon1-color);
    background-color: rgba(51, 73, 102, 0.15);
    color: #fff;
}

.time-perspective.horizon2 {
    border-color: var(--horizon2-color);
    background-color: rgba(125, 133, 151, 0.15);
    color: #fff;
}

.time-perspective.horizon3 {
    border-color: var(--horizon3-color);
    background-color: rgba(201, 205, 214, 0.15);
    color: #fff;
}

/* Alte Klassen für Kompatibilität */
.time-perspective.operative {
    border-color: var(--horizon0-color);
    background-color: rgba(10, 25, 48, 0.15);
    color: #fff;
}

.time-perspective.strategic {
    border-color: var(--horizon2-color);
    background-color: rgba(125, 133, 151, 0.15);
    color: #fff;
}

.time-perspective.visionary {
    border-color: var(--horizon3-color);
    background-color: rgba(201, 205, 214, 0.15);
    color: #fff;
}

/* Zukunftsbrillen-Styles */
.zukunftsbrille-geplante {
    color: var(--zukunftsbrille-geplante);
}

.zukunftsbrille-wahrscheinliche {
    color: var(--zukunftsbrille-wahrscheinliche);
}

.zukunftsbrille-erstrebte {
    color: var(--zukunftsbrille-erstrebte);
}

.zukunftsbrille-ueberraschende {
    color: var(--zukunftsbrille-ueberraschende);
}

.zukunftsbrille-gestaltbare {
    color: var(--zukunftsbrille-gestaltbare);
}

/* Source excerpts styling */
.source-excerpt {
    font-family: var(--bs-font-monospace);
    font-size: 0.9rem;
    white-space: pre-wrap;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
}

.source-excerpt::-webkit-scrollbar {
    width: 6px;
}

.source-excerpt::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.source-excerpt::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.source-link {
    color: var(--bs-info);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 0 2px;
}

.source-link:hover {
    text-decoration: underline;
    color: var(--bs-info);
}

/* Expandable sections */
.expandable-section {
    padding: 12px 25px 12px 15px;
    margin: 15px 0;
    border-radius: 8px;
    background-color: rgba(0, 123, 255, 0.05);
    border-left: 4px solid rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: visible;
}

.expandable-section.horizon0 {
    border-color: var(--horizon0-color);
    background-color: rgba(10, 25, 48, 0.15);
}

.expandable-section.horizon1 {
    border-color: var(--horizon1-color);
    background-color: rgba(51, 73, 102, 0.15);
}

.expandable-section.horizon2 {
    border-color: var(--horizon2-color);
    background-color: rgba(125, 133, 151, 0.15);
}

.expandable-section.horizon3 {
    border-color: var(--horizon3-color);
    background-color: rgba(201, 205, 214, 0.15);
}

/* Alte Klassen für Kompatibilität */
.expandable-section.operative {
    border-color: var(--horizon0-color);
    background-color: rgba(10, 25, 48, 0.15);
}

.expandable-section.strategic {
    border-color: var(--horizon2-color);
    background-color: rgba(125, 133, 151, 0.15);
}

.expandable-section.visionary {
    border-color: var(--horizon3-color);
    background-color: rgba(201, 205, 214, 0.15);
}

.expandable-section .expand-indicator {
    position: absolute;
    right: -40px; /* Neben der Box und nicht als Überlagerung */
    top: 0;
    bottom: 0;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 0 4px 4px 0;
    background-color: rgba(0, 123, 255, 0.7);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.expandable-section .expand-indicator:hover {
    background-color: rgba(0, 123, 255, 0.9);
    padding-right: 12px;
    right: -42px;
}

.expandable-section.horizon0 .expand-indicator {
    background-color: var(--horizon0-color);
    color: #fff;
}

.expandable-section.horizon1 .expand-indicator {
    background-color: var(--horizon1-color);
    color: #fff;
}

.expandable-section.horizon2 .expand-indicator {
    background-color: var(--horizon2-color);
    color: #fff;
}

.expandable-section.horizon3 .expand-indicator {
    background-color: var(--horizon3-color);
    color: #333; /* Dunkler Text für den helleren Hintergrund */
}

/* Alte Klassen für Kompatibilität */
.expandable-section.operative .expand-indicator {
    background-color: var(--horizon0-color);
    color: #fff;
}

.expandable-section.strategic .expand-indicator {
    background-color: var(--horizon2-color);
    color: #fff;
}

.expandable-section.visionary .expand-indicator {
    background-color: var(--horizon3-color);
    color: #333;
}

/* Erweiterte Inhalte */
.expanded-content {
    margin-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    padding-top: 10px;
}

/* Animation für den Ladeindikator */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .message {
        max-width: 90%;
    }
    
    .horizon-badge .badge {
        min-width: 80px;
        font-size: 0.7rem;
    }
    
    /* Kleinere Erweiterungstabs auf Mobilgeräten */
    .expandable-section .expand-indicator {
        right: -30px;
        padding: 4px 6px;
        font-size: 0.75rem;
    }
}
