/* Styling für Markdown-Inhalte */
.help-content {
    line-height: 1.6;
    color: #333;
    font-size: 1.1rem;
}

/* Überschriften-Abstände */
.help-content h1, .help-content h2, .help-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Tabellen im Bootstrap-Look */
.help-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
}

.help-content table th, 
.help-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.help-content table th {
    background-color: #f8f9fa;
}

/* Zitate (Blockquotes) */
.help-content blockquote {
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    color: #6c757d;
    border-left: 5px solid #0d6efd;
    background-color: #f8f9fa;
    font-style: italic;
}

/* Code-Blöcke (für technische Hilfe) */
.help-content pre {
    background-color: #ffffff;
    color: #2e2e2e;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

.help-content code {
    background-color: #f8f9fa;
    color: #3d3d3d;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.help-content p img {
    display: block;
    /* Zentriert das Bild */
    margin: 2rem auto;
    
    /* Verhindert, dass das Bild breiter als der Text wird */
    max-width: 100%;
    
    /* Sorgt dafür, dass kleine Bilder NICHT künstlich aufgebläht werden */
    width: auto;
    
    /* Behält das Seitenverhältnis bei */
    height: auto;
    
    /* Optische Abhebung */
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Globale Absicherung gegen horizontales Scrollen */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    /* Verstecke den Tabellenkopf */
    .table-responsive-stack thead {
        display: none !important;
    }

    /* Eingerückter Projektname wird korrigiert */
    .table-responsive-stack tbody tr td:first-child.ps-4 {
        padding-left: 0.75rem !important;
    }

    /* Die Tabelle selbst darf nicht als Tabelle agieren */
    .table-responsive-stack, 
    .table-responsive-stack tbody {
        display: block;
        width: 100% !important;
    }

    /* Jede Zeile wird zur Karte */
    .table-responsive-stack tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        padding: 0.5rem;
        background-color: #fff;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        /* Wichtig: Verhindert, dass die Karte breiter als der Viewport wird */
        width: 100% !important;
        box-sizing: border-box;
    }

.table-responsive-stack tr:active {
        background-color: #f8f9fa; /* Kurzes Feedback beim Tippen */
        transform: scale(0.98);    /* Minimales "Eindrücken" der Card */
        transition: transform 0.1s;
    }

    .table-responsive-stack td {
        display: flex; 
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 0.5rem 0.75rem;
        text-align: right;
        /* Verhindert, dass langer Inhalt die Zelle aufdrückt */
        width: 100% !important;
        box-sizing: border-box;
        min-width: 0; 
    }

    /* Text-Containment: Zwingt den Text innerhalb der Karte zu bleiben */
    .table-responsive-stack td div.text-truncate {
        max-width: 55vw !important; /* Dynamische Breite je nach Display */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Erzeuge das Label aus dem data-label Attribut */
    .table-responsive-stack td::before {
        content: attr(data-label);
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: #6c757d;
        padding-right: 1rem;
        text-align: left;
        flex-shrink: 0; /* Label darf nicht schrumpfen */
    }
    
    /* Sonderfall für die Spalte mit den Icons (Kommentare) */
    .table-responsive-stack td:last-child {
        justify-content: flex-end;
        border-top: 1px solid #eee;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .table-responsive-stack td:last-child::before {
        content: none;
    }

    /* Tags-Container Anpassung für Mobile */
    .table-responsive-stack td.cell-tags div {
        justify-content: flex-end !important;
    }

    /* Den Umschalt-Button ausblenden */
    #mainViewToggle {
        display: none !important;
    }

    /* WICHTIG: Sicherstellen, dass die Cards im Mobile-Modus 
       ihr eigenes Text-Handling haben und nicht von force-expand 
       negativ beeinflusst werden */
    #ajax-target .text-truncate {
        max-width: 100% !important;
        white-space: normal !important; /* In Cards will man meist alles lesen */
    }


}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Format */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- BASIS-ZUSTAND (Kompakt) --- */

/* Vorbereitung für die Animation */
#ajax-target .text-truncate {
    transition: max-width 0.4s ease, padding 0.3s ease;
    /* Damit die Transition bei max-width funktioniert, 
       muss ein Ausgangswert bekannt sein (passend zu deinem Inline-Style) */
    max-width: 300px; 
}

#ajax-target tr td {
    transition: padding 0.3s ease-in-out, background-color 0.3s ease;
    vertical-align: middle; /* Mittig im Kompakt-Modus */
}


/* --- ERWEITERTER ZUSTAND (Aktiviert über Body-Klasse) --- */

/* 1. Text-Beschränkungen aufheben */
body.force-expand #ajax-target td div.text-truncate {
    /* !important ist hier zwingend, um deine Inline-Styles im HTML zu schlagen */
    max-width: 100% !important; 
    white-space: normal !important; /* Erlaubt Zeilenumbrüche */
    overflow: visible !important;
    text-overflow: clip !important;
    display: block !important;
}

/* 2. Zeilen-Styling */
body.force-expand #ajax-target tr {
    background-color: rgba(0, 0, 0, 0.015) !important;
    border-bottom: 1px solid #dee2e6 !important;
}

/* 3. Abstände und Ausrichtung */
body.force-expand #ajax-target tr td {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    vertical-align: top !important; /* Text oben bündig bei viel Inhalt */
}

/* 4. Visuelle Akzente (Optional) */
body.force-expand #ajax-target td[data-label="Titel"] {
    font-weight: bold;
}

body.force-expand #ajax-target td[data-label="Beschreibung"] {
    color: #212529; /* Beschreibung dunkler/lesbarer machen */
}

/* Stellt sicher, dass das Icon im Toggle-Button immer sichtbar bleibt */
#mainViewToggle i {
    color: #6c757d !important; /* Standard Bootstrap-Grau */
    display: inline-block;
    line-height: 1;
}

/* Optional: Wenn der Button aktiv ist, machen wir das Icon etwas dunkler oder blau */
body.force-expand #mainViewToggle i {
    color: #0d6efd !important; /* Bootstrap Blau */
}


.promo-wrapper {
        width: 100%;
        margin: 1rem 0;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start;
        text-align: center !important;
        /* Wir reservieren Platz für Label + Abstand + Banner */
        min-height: 120px; 
    }

    .promo-label {
        display: block;
        width: 100%;
        height: 22px; /* Feste Höhe zurückgegeben */
        line-height: 22px;
        font-size: 10px !important;
        text-transform: uppercase;
        color: #6c757d;
        letter-spacing: 1px;
        margin-bottom: 6px;
        -webkit-text-size-adjust: none;
        text-align: center !important;
    }

    .promo-slot {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        /* Hier reservieren wir die Höhe des Desktop-Banners (z.B. 90px) */
        min-height: 90px; 
    }

    /* Der Skalierungs-Wrapper bleibt für Mobile/iPad Portrait kritisch */
    .promo-scale-wrapper {
        display: inline-block;
        transform: scale(0.48);
        transform-origin: center top;
        /* Der negative Margin verhindert den 'Geister-Raum' unter dem skalierten Bild */
        margin-bottom: -110px; 
    }

    .promo-slot img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }

/* Ab hier beginnen die Formatierungen für den Activity Feed */
.req-tooltip-base {
    width: 350px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Stil für die dynamischen Tags aus deinem Model */
.tt-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white; /* Textfarbe auf den farbigen Tags */
    text-shadow: 0px 0px 2px rgba(0,0,0,0.3);
}

#tt-desc {
    line-height: 1.5;
    word-wrap: break-word;
}

.history-scroll-container-modal {
    max-height: 150px; /* Oder ein beliebiger Wert */
    overflow-y: auto;  /* Scrollbar erscheint nur, wenn nötig */
    padding-right: 10px; /* Platz für den Scrollbalken */
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
}

.history-scroll-container-detail {
    max-height: 300px; /* Oder ein beliebiger Wert */
    overflow-y: auto;  /* Scrollbar erscheint nur, wenn nötig */
    padding-right: 10px; /* Platz für den Scrollbalken */
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
}
.hp-container {
    display: none !important;
    visibility: hidden;
    position: absolute;
    left: -9999px;
}