.il_after_tabs_spacing, .il_HeaderInner {
    /* display:none; */
}

.lf-chat {
    /*margin-top: 20px;
    background-color: yellow;
    min-height: calc(50vh);*/
}

.lf-chat-side {
    height: 100%;
}

.lf-chat-sticky {
    position: sticky;
    top: 40px;
}

.lf-chat-loader {
    width: 1em;
    height: 1em;
}

.lf-chat-input-section {
    display: block;
    width: 100%;
    /*flex-direction: row;
    align-items: flex-end;*/
}

.lf-chat-input {
    flex-grow: 1;
    padding: 5px;
}

.lf-chat-button-section {
    display: flex;
    flex-direction: row;
}
.lf-chat-button-section div {
    padding: 5px 0px 10px 5px;
}



.lf-chat-button-section button {
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

.lf-chat-input-ta {
    width: 100%;
    border: 1px solid #F0F0F0;
    border-radius: 5px;
    resize: vertical;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    padding: 10px;
}

.lf-bot-message, .lf-user-message {
    display: flex;
    flex-direction: row;
    border: 1px solid #F0F0F0;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    padding: 10px;
    width: 90%;
    margin: 10px 5px 20px 5px;
}

.lf-bot-message {
    margin-left: 5px;
    margin-right: auto;
}

.lf-user-message {
    margin-right: 5px;
    margin-left: auto;
}

.lf-bot-message-content-wrapper,
.lf-bot-message-content,
.lf-user-message-content {
    flex-grow: 1;
    min-width: 0; /* let the text column shrink inside the bubble */
}

.lf-bot-message-content {
    overflow-wrap: break-word; /* moderne Lösung */
}

.lf-bot-message-content,
.lf-bot-message-references,
.lf-bot-message-thinking,
.lf-user-message-content {
    padding: 0 20px;
    min-width: 0; /* let the text column shrink inside the bubble */
}

.lf-bot-message-references {
    font-size: 0.8rem;
}

.lf-bot-message-thinking {
    font-size: 0.8rem;
    background: #f5f5f5;
    padding: 0.5rem;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    border-radius: 10px;
    padding: 15px;
    margin-left: 20px;
    margin-bottom: 15px;
    line-height: 1.2em;              /* adjust if needed */
    max-height: calc(1.2em * 5);     /* visible height = 5 rows */
    overflow-y: auto;                /* scrollable */
}

.lf-bot-message-images {
    img {
        max-width: 100%;
        max-height: 50vh;
    }
}

.lf-bot-message-avatar .il-avatar {
    border: 0;
}

.lf-introduction, .lf-hint {
    border: 3px solid #7d95d9;
    background-color: #e9eeff;
    border-radius: 15px;
    /*box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);*/
    padding: 10px;
    margin: 10px 5px 20px 5px;
}

.lf-agreement-info {
    margin: 10px 5px 20px 5px;
}

/* right align dropdown menu */
.lf-chat-side {
    margin-top: 10px;
    .dropdown-menu {
        right: 0;
        left: auto;
    }
}
.lf-chat-messages table {
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
    table-layout: fixed;      /* Zellen teilen sich die Breite */
    display: block;           /* nötig für overflow-x */
    overflow-x: auto;         /* horizontales Scrollen statt Ausbrechen */
}

.lf-chat-messages table th,
.lf-chat-messages table td {
    padding: 3px 5px;
    font-size: 90%;
}

.lf-chat-messages table th {
    border-bottom: 2px solid #d5d5d5;
}

.lf-chat-messages pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 10px;
}

.lf-chat-messages .code-wrapper {
    border:1px solid #e1e4e8;
    border-radius:6px;
    margin:1em 0;
}
.lf-chat-messages .code-header  {
    background:#f6f8fa;
    font:12px/1.4 monospace;
    padding:4px 8px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.lf-chat-messages .code-lang    {
    text-transform:uppercase;
    color:#555;
}
.lf-chat-messages .copy-btn,
.lf-chat-messages .lfassist-downloads {
    border:0;
    background:none;
    cursor:pointer;
    font-size:12px;
    color:#0366d6;
}

.lf-chat-messages .lfassist-downloads {
    display: block;
    margin-top: 10px;
}

/* Expandable Box */
.lfassist-expandable {
    position: relative;
    border: 1px solid #ccc;
    padding: 20px;
}

.code-wrapper .lfassist-expandable {
    border: 0;
    padding: 0;
}

/* Fullscreen: Weißer Hintergrund + Inhalt zentriert + Scrollbar */
/* Fullscreen: scrollt der Container */
.lfassist-expandable:fullscreen {
    background: white !important;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;           /* wichtig: scroll container */
}

/* Stage: zentriert den Inhalt innerhalb des sichtbaren Bereichs */
.lfassist-expandable:fullscreen .lfassist-stage {
    min-width: 100%;
    min-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ZoomBox: bekommt vom JS echte Breite/Höhe => Scrollbereich stimmt */
.lfassist-zoombox {
    position: relative;
}

/* Inner: wird nur gezeichnet (scale), nicht fürs Layout benutzt */
.lfassist-expandable:fullscreen .lfassist-inner {
    position: absolute;
    left: 0;
    top: 0;
}

/* Fullscreen Button */
.lfassist-expandable .fs-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    cursor: pointer;
    background: #00000088;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 18px;
}

/* Close Button */
.lfassist-expandable .fs-close,
.lfassist-expandable .fs-zoom-in,
.lfassist-expandable .fs-zoom-out {
    position: absolute;
    cursor: pointer;
    background: #00000088;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 18px;
    display: none;
}

.lfassist-expandable .fs-close {
    top: 10px;
    right: 10px;
}

/* Zoom Buttons */
.lfassist-expandable .fs-zoom-in { bottom: 8px; right: 10px; }
.lfassist-expandable .fs-zoom-out { bottom: 8px; right: 50px; }

/* Sichtbarkeit im Fullscreen */
.lfassist-expandable:fullscreen .fs-close,
.lfassist-expandable:fullscreen .fs-zoom-in,
.lfassist-expandable:fullscreen .fs-zoom-out {
    display: block;
    position: fixed;
}

.lfassist-expandable:fullscreen .fs-btn {
    display: none;
}

.lf-chat-agreement > h1:first-child,
.lf-chat-agreement > h2:first-child,
.lf-chat-agreement > h3:first-child {
    margin-top: 0;
}