#vd_logo {
    background-color: #ffffff;
    margin-right: 1.5rem;
}
.vd_navicon.active > * {
    color: #bfdbef;
}
.container-large {
    max-width: 100%;
}
/* Mobile-First: Container ist standardmäßig auf voller Breite */
#vdc_container > .container {
    max-width: unset;
}
.bg-transparent {
    background-color: transparent !important;
}
.vdc_query_group .dropdown-menu {
    z-index: 13031 !important;
}
#input_query_qa, #input_query_chat {
    height: calc(38px + 38px + 0.5rem);
}

/* Admin Panel Buttons */
#admin_panel .btn-light, 
#admin_panel .btn-light:active, 
#admin_panel .btn-light:focus, 
#admin_panel .btn-light:disabled:hover, 
#admin_panel .custom-file-label {
    background-color: #02376d !important;
    border-color: #02376d !important;
    color: #ffffff !important;
}
#admin_panel .btn-light:hover, 
#admin_panel .show > .btn-light.dropdown-toggle {
    background-color: #0351a1 !important;
    border-color: #0351a1 !important;
    color: #ffffff !important;
}
.custom-file-label:after {
    content: "\f574";
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    background-color: #02376d;
    color: #ffffff;
}

.ignore_click {
    pointer-events: none;
}
#newcontent {
    display: flex;
    flex-direction: column;
    /* Mobile-First-Stil wird für alle Größen beibehalten */
    min-height: calc(100vh - 77px) !important;
}

/* Haupt-Container und Sidebar-Layout */
#vdc_container {
    display: flex;
    flex-grow: 1;
    width: 100%;
    -ms-overflow-style: none; 
    scrollbar-width: none;
}
.cursor-pointer-strong {
    cursor: pointer;
}
#vdc_side {
        height: 100vh;
    }
@media (max-width: 991px) {
    /* Button ist sichtbar */
    #toggle-sidebar {
        display: block !important;
    }
    #vdc_side.active #collapse-sidebar {
        display: none !important;
    }
    
    /* Seitenleiste als verstecktes Overlay definieren */
    #vdc_side {
        position: fixed !important;
        width: 80px;
        height: 10vh;
        z-index: 1100;
        top: 0;
        left: 0;
        transform: translateX(0%); /* Versteckt */
        transition: transform 0.3s ease-in-out;
    }
    
    /* Overlay beim Öffnen einblenden */
    #vdc_side.active {
        display: block;
        width: 280px;
        height: 100vh;
        background-color: #dbeafe;;
        transform: translateX(0%);
        box-shadow: 0 0 15px rgba(0,0,0,0.25);
    }
    
    #vdc_side .sidebar-content-collapsible {
        display: none;
    }   

    #vdc_side.active .sidebar-content-collapsible {
        display: block;
    }
    
    /* Optional: Overlay-Hintergrund für bessere UX */
    body.sidebar-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 1099;
    }
    .sidebar-logo {
        display: none;
    }
    .info-button {
        display: none !important;
    }
}

@media (min-width: 992px) {
    #toggle-sidebar {
        display: none !important;
    }
    
    #vdc_side {
        position: static !important; /* Setzt "position: fixed" zurück */
        transform: none !important; /* Setzt "transform" zurück */
        width: 80px; /* Standardmäßig schmal */
        flex-shrink: 0;
        transition: width 0.3s ease;
        overflow: hidden;
        background: #dbeafe;
    }

    #vdc_side .collapse {
        display: none !important;
    }

    #vdc_side:hover .collapse.show {
        display: block !important;
    }

    #vdc_side.pinned .collapse.show {
        display: block !important;
    }

    #vdc_side .vstack {
        align-items: center;
    }
    
    /* Bei Hover wird die Seitenleiste breit */
    #vdc_side:hover {
        width: 280px;
    }

    #vdc_side:hover .vstack { 
       align-items: unset; 
    }
    
    .sidebar-logo {
    max-width: 50px;
        transition: max-width 0.3s ease;
    }

    #vdc_side:hover .sidebar-logo {
        max-width: 150px;
    }

    .sidebar-text {
        display: none;
        white-space: nowrap;
    }

    #vdc_side:hover .sidebar-text {
        display: inline;
    }

    #vdc_side .nav-link, #vdc_side .btn {
        justify-content: center;
    }
    #vdc_side:hover .nav-link, #vdc_side:hover .btn {
        justify-content: flex-start;
    }

    /* Wenn Sidebar "gepinnt" ist */
    #vdc_side.pinned {
        width: 280px; /* wie bei Hover */
    }

    #vdc_side.pinned .sidebar-logo {
        max-width: 150px;
    }

    #vdc_side.pinned .sidebar-text {
        display: inline;
        opacity: 1;
        visibility: visible;
    }

    #vdc_side.pinned .nav-link,
    #vdc_side.pinned .btn {
        justify-content: flex-start;
    }
    
    #vdc_side.pinned .vstack { 
        align-items: unset; 
    }

    /* Hover-Überschreibung: keine Änderung, wenn gepinnt */
    #vdc_side.pinned:hover {
        width: 280px; /* fix */
    }
    #vdc_side .info-button {
        opacity: 0 !important;
        pointer-events: none;
        position: absolute;
        right: 8px;
    }
    
    #vdc_side:hover .info-button,
    #vdc_side.pinned .info-button {
        opacity: 1 !important;
        pointer-events: auto;
    }
   #vdc_side .accordion-header {
        position: relative;
    }
}

#vdc_main {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0; /* Wichtig, damit der Hauptinhalt nicht über die Breite hinausläuft */
    max-height: 100vh;
    transition: all 0.3s;
    /* Mobile-First: Kein horizontaler Padding */
    padding-right: 0;
    padding-left: 0;
}
#vdc_side_newsfeed {
    background-color: var(--bs-card-cap-bg);
    position: relative;
    max-height: 82.5vh;
    z-index: 1;
}
.newsfeed_content {
    max-height: calc(95vh - 45px);
    overflow-y: scroll;
    overflow-x: hidden;
}

/* Toggle-Buttons */
#toggle-newsfeed {
    transition: all 0.3s ease;
}
.sticky-news-header {
    background-color: #f2f2f2; 
}
#toggle-newsfeed.newsfeed-collapsed {
    right: 20px; 
}

/* Mobile-First Pagefooter Stile */
.pagefooter {
    padding: 1rem;
}
.pagefooter .container {
    max-width: unset;
}
.pagefooter br {
    display: none;
}
.pagefooterlink {
    font-size: 0.75rem;
    display: inline-block;
    margin: 0 0.5rem !important;
}
.pagefooterlink:after {
    content: none;
}
.copyright {
    display: block;
    margin-top: 0.5rem;
}

/* Listgroups */
.vdc_listgroups {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-shrink: 1;
    max-height: 460px;
    overflow: auto;
}
.vdc_listgroup_btn:not(.collapsed) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
/* Mobile-First Stil für Listgroup-Buttons */
.vdc_listgroup .btn-group-vertical .btn:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.vdc_listgroup_btn.collapsed .fa-chevron-up {
    transform: rotate(180deg);
}
.vdc_listgroup_btn .badge {
    overflow: hidden;
    text-overflow: ellipsis;
}
#vdc_listgroup_sessions .list-group-item, #vdc_listgroup_folders .list-group-item {
    padding: 0.375rem 0.75rem;
}
.session_btn.disabled, 
.session_btn.disabled *, 
.new_session_btn.disabled, 
.new_session_btn.disabled * {
    pointer-events: none !important;
}
.session_btn:hover .session_edit, 
.folder_btn:hover .folder_edit {
    opacity: 1 !important;
}
.session_name, .folder_name {
    height: calc(1.5em + .5rem + 2px);
    padding: .25rem .5rem;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.folder_doc_remove {
    cursor: pointer;
}
.remove_doc_from_index {
    display: none;
}
.new_session_mode_options label {
    cursor: pointer;
}

/* Dropdown */
.btn.dropdown-toggle.btn-light {
    border: 1px solid #ced4da;
    background-color: #ffffff;
}
.dropdown-menu > .active > a, 
.dropdown-menu > .active > a:focus, 
.dropdown-menu > .active > a:hover {
    background-image: none !important;
    background-color: #bfdbef;
    color: #02376d;
}

/* Tabs */
#mode_tab_qa, 
#mode_tab_chat, 
#mode_tab_check, 
#mode_tab_info {
    height: 92vh;
    min-height: 400px;
    flex-grow: 1;
    flex-shrink: 1;
}
#mode_tab_qa.active, 
#mode_tab_chat.active, 
#mode_tab_check.active, 
#mode_tab_info.active {
    display: flex;
    flex-direction: column;
}

/* Output Overlays */
.output_tab_overlay {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity ease-in-out 0.35s;
    opacity: 0;
}
.output_tab_overlay.show {
    opacity: 1;
}

/* ==================== OUTPUT TABS ==================== */
#output_tab_chat,
#output_tab_check,
#output_tab_info {
    overflow-y: auto;
    flex: 1;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

#output_tab_chat::-webkit-scrollbar {
    width: 6px;
}

#output_tab_chat::-webkit-scrollbar-track {
    background: transparent;
}

#output_tab_chat::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

#output_tab_chat {
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1.75rem;
    padding-right: 1.75rem;
}

#output_tab_chat.active {
    display: flex;
}

/* ==================== TABLES ==================== */
.output_a .table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.output_a .table tr,
.output_a .table td {
    border-color: rgba(0,0,0,0.08);
}

.output_a .table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* ==================== CHAT ANIMATIONS ==================== */
.output_qa, 
.output_chat {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.output_chat:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* ==================== TYPOGRAPHY ==================== */
.output_chat, 
#output_tab_info {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    line-height: 1.6;
}

/* ==================== AVATAR ICONS ==================== */
.output_qa:before, 
.output_chat:before {
    font-family: 'Font Awesome 6 Pro', 'Font Awesome 5 Free', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: white;
    margin-right: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.output_chat:hover:before {
    transform: scale(1.05);
}

/* ==================== CHAT BUBBLES ==================== */
.output_chat {
    position: relative;
    border-radius: 18px;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    max-width: 85%;
    word-wrap: break-word;
}

.output_chat:first-child {
    margin-top: 1rem;
}

.output_chat > div > *:last-child {
    margin-bottom: 0;
}

/* ==================== USER MESSAGES ==================== */
.output_chat.output_q {
    align-self: flex-end;
    margin-left: 15%;
    background: linear-gradient(135deg, #667eea 0%, #4c63d2 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.output_chat.output_q:before {
    background: linear-gradient(135deg, #5a67d8 0%, #4299e1 100%);
    border: 2px solid rgba(255,255,255,0.2);
}

/* ==================== AI MESSAGES ==================== */
.output_chat.output_a {
    margin-right: 15%;
    background: linear-gradient(135deg, #e6f3ff 0%, #cce7ff 100%);
    border: 1px solid rgba(66, 153, 225, 0.2);
    color: #1a365d;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.15);
}

.output_a:before {
    content: '';
    background-color: #ffffff;
    background-image: url("../images/justinian_logo-171adf4bb77de1bf3817775833aeeb3a.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 2px solid rgba(255,255,255,0.2);
}

/* ==================== LISTS IN CHAT ==================== */
.output_chat ul, 
.output_chat ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.output_chat li {
    margin-bottom: 0.25rem;
}

/* ==================== CHAT TAILS ==================== */
.output_chat:after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    bottom: 0;
    border-style: solid;
}

.output_chat.output_q:after {
    right: -8px;
    border: 8px solid transparent;
    border-left: 8px solid #4c63d2;
    border-bottom: none;
}

.output_chat.output_a:after {
    left: -8px;
    border: 8px solid transparent;
    border-right: 8px solid #cce7ff;
    border-bottom: none;
}

/* ==================== AVATAR POSITIONING ==================== */
.output_chat:before {
    position: absolute;
    bottom: -3rem;
}

.output_chat.output_q:before {
    right: 0;
    margin-right: 0px;
}

.output_chat.output_a:before {
    left: 0;
    margin-left: 0px;
}

/* ==================== AVATAR ICONS ==================== */
.output_q:before {
    content: "\f007";                   
    font-family: 'Font Awesome 7 Free'; 
    font-weight: 900;                   
}


/* ==================== TYPING INDICATOR ==================== */
.output_chat .output_pending {
    display: inline-block;
    margin: 0.5rem 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4299e1;
    animation: typing 1.4s infinite ease-in-out;
    position: relative;
}

.output_chat .output_pending::before,
.output_chat .output_pending::after {
    content: '';
    display: inline-block;
    position: absolute;
    top: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4299e1;
    animation: typing 1.4s infinite ease-in-out;
}

.output_chat .output_pending::before {
    left: -16px;
    animation-delay: -0.32s;
}

.output_chat .output_pending::after {
    left: 16px;
    animation-delay: 0.32s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== QA OUTPUT (Legacy Support) ==================== */
.output_qa {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.output_qa.output_q {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border: 1px solid rgba(0,0,0,0.08);
}

.output_qa.output_a:before {
    display: none;
}

/* ==================== SCROLL ANCHOR ==================== */
#output_tab_chat .output_anchor {
    position: relative;
    margin-top: 3rem;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .output_chat {
        max-width: 95%;
        margin-left: 2.5% !important;
        margin-right: 2.5% !important;
    }
    
    .output_chat.output_q {
        margin-left: 5% !important;
    }
    
    .output_chat.output_a {
        margin-right: 5% !important;
    }
    
    #output_tab_chat {
        padding: 0.5rem 0.25rem 3rem;
    }
}



/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    .output_qa, 
    .output_chat {
        animation: none;
        transition: none;
    }
    
    .output_chat:hover {
        transform: none;
    }
}

/* Source Links */
.source_link {
    position: relative;
}
.source_link:before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 0.25rem;
}
.source_link_dif:before {
    content: "\f15c";
}
.source_link_gesetz:before {
    content: "\f111";
}
.source_link_gesetz:after {
    position: absolute;
    top: 0;
    left: 0;
    content: "\00a7";
    font-family: 'Open Sans', sans-serif;
    color: #F2F4F6;
    padding: 0 0.25rem;
}
.source_link_beschluss:before, 
.source_link_urteil:before, 
.source_link_eughvorlage:before, 
.source_link_versaeumnisurteil:before {
    content: "\f0e3";
}

.sources_list .fa-paragraph:before, 
#edit_folder_docs .fa-paragraph:before {
    content: "\00a7";
    font-family: 'Open Sans', sans-serif !important;
}
.bottom-menu {
    margin-top: 0 !important;
}

/* User Profile Form (Mobile-First) */
.user-profile-form {
    width: 100%;
    max-width: 800px;
    margin: auto;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: sans-serif;
}
.user-profile-form__group {
    margin-bottom: 1.5rem;
}
.user-profile-form__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.user-profile-form__input,
.user-profile-form__select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.user-profile-form__help-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.3rem;
    display: block;
}
.user-profile-form__2fa-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.user-profile-form__2fa-option {
    display: flex;
    align-items: center;
}
.user-profile-form__radio {
    margin-right: 0.5rem;
}
.user-profile-form__radio-label {
    font-weight: 400;
}
.user-profile-form__actions {
    text-align: center;
}
.user-profile-button {
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.user-profile-button:hover {
    background-color: #0056b3;
}

#share_button {
    background-color: #2563eb;
    border-color: #2563eb;
}

.consta_icon {
    color: #2563eb;
}

#chat_button {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Copy to Clipboard Button */
.output_qa.output_a, 
.output_chat.output_a {
    position: relative;
    padding-bottom: 35px; 
}
.copy-to-clipboard-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0; 
    transition: opacity 0.2s ease-in-out;
}
.output_qa.output_a:hover .copy-to-clipboard-btn,
.output_chat.output_a:hover .copy-to-clipboard-btn {
    opacity: 1;
}
.copy-to-clipboard-btn.copied {
    border-color: rgba(191,219,239,0.9);
    background-color: rgba(191,219,239,0.9);
}

/* Input Fields */
.input_query {
    resize: none;
    min-height: 40px;
    max-height: 200px;
    overflow-y: auto;
}
.btn-group-chat {
    position: absolute;
    bottom: 10px;
    right: 5px;
    display: flex;
    gap: 5px;
    z-index: 10;
}
.btn-group-chat .btn {
    padding: 0.375rem 0.75rem;
}
.input-group textarea {
    padding-right: 80px;
    resize: none;
}

/* CSS für den Anhang-Button (GRÖSSERE VERSION) */

.file-upload-wrapper {
    position: relative;
    display: inline-block;
    height: 36px; /* NEU: 36px */
    width: 36px;  /* NEU: 36px */
}

#attach_pdf_btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 1.25rem; /* NEU: Etwas größer, z.B. 1.25rem oder 20px */
    overflow: hidden;
}

#attach_pdf_btn i {
    position: absolute;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#attach_pdf_btn .default-icon {
    opacity: 1;
    transform: scale(1);
}

#attach_pdf_btn .upload-success-icon,
#attach_pdf_btn .upload-spinner-icon,
#attach_pdf_btn .upload-failed-icon {
    opacity: 0; /* Standardmäßig unsichtbar */
    transform: scale(0); /* Standardmäßig klein/unsichtbar */
}

/* ... (Die .default-icon und .upload-success-icon Stile bleiben gleich) ... */

/* Fortschrittskreis */
.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg); /* Startet den Kreis oben */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.progress-ring-circle {
    /* * WICHTIG: stroke-dasharray muss neu berechnet werden!
     * Neuer Radius (r) = 16
     * Neue Formel: 2 * PI * 16 = ca. 100.53
     */
    stroke-dasharray: 100.53; /* NEU */
    stroke-dashoffset: 100.53; /* NEU */
    transition: stroke-dashoffset 0.3s ease-in-out;
    transform-origin: center;
}
/* ==================== ANIMATIONEN FÜR DEN UPLOAD-STATUS ==================== */
#attach_pdf_btn.files-selected .default-icon {
    transform: scale(0.9); /* Kleiner "Zuck" beim Auswählen */
}

/* 2. Wenn der Upload startet */
#attach_pdf_btn.uploading .default-icon {
    opacity: 0; /* Büroklammer verschwindet */
    transform: scale(0.5); /* Kleiner werden */
}

#attach_pdf_btn.uploading .upload-spinner-icon {
    opacity: 1;
    transform: scale(1);
    animation: spin 1.5s linear infinite;
}

#attach_pdf_btn.uploading .progress-ring {
    opacity: 1; /* Ring wird sichtbar */
}
/* Optional: Icon-Wechsel, wenn der Upload startet (z.B. zu einem Lade-Spinner) */
/* #attach_pdf_btn.uploading .default-icon { display: none; } */
/* #attach_pdf_btn.uploading .fa-spinner { display: block; animation: spin 1s linear infinite; } */


/* 3. Wenn der Upload abgeschlossen ist */
#attach_pdf_btn.upload-complete .progress-ring {
    opacity: 0; /* Ring verschwindet */
    transition: opacity 0.3s ease-in-out 0.2s; /* Leicht verzögert ausblenden */
}
#attach_pdf_btn.upload-complete .default-icon {
    opacity: 0; /* Büroklammer bleibt unsichtbar */
    transform: scale(0);
}
#attach_pdf_btn.upload-complete .upload-success-icon {
    opacity: 1; /* Haken wird sichtbar */
    transform: scale(1);
    animation: success-bounce 0.5s ease; /* Ein kleiner Bounce für den Haken */
}

/* ---  Zustand für 'upload-failed' hinzufügen --- */

#attach_pdf_btn.upload-failed .default-icon,
#attach_pdf_btn.upload-failed .upload-spinner-icon,
#attach_pdf_btn.upload-failed .upload-success-icon {
    opacity: 0;
    transform: scale(0);
}

#attach_pdf_btn.upload-failed .upload-failed-icon {
    opacity: 1;
    transform: scale(1);
    color: #D9534F; /* Rot für Fehler */
    /* Wir recyceln deine coole Bounce-Animation für den Fehler */
    animation: success-bounce 0.5s ease; 
}

/* Ring und Spinner-Animation bei Fehler stoppen/ausblenden */
#attach_pdf_btn.upload-failed .progress-ring {
    opacity: 0;
}
#attach_pdf_btn.upload-failed .upload-spinner-icon {
    animation: none;
}

.footer-item-list {
    display: flex;
    flex-direction: column; /* Listet die Items untereinander auf */
    gap: 4px; /* Kleiner Abstand zwischen den Items */
    margin-bottom: 5px; /* Abstand zum "aktuellen" Upload-Feld */
}
/* Styling für den neuen "Remove"-Button in der Erfolgs-Liste */
.remove-success-item {
    cursor: pointer;
    color: #6c757d; /* Standard-Icon-Grau */
    transition: color 0.2s ease;
}

.remove-success-item:hover {
    color: #dc3545; /* Rot beim Darüberfahren */
}

/* * Optional: Stellt sicher, dass der Dateiname den Button
 * nicht verdrängt, falls dein .footer-item kein Flexbox ist.
*/
.successful-upload-item {
    display: flex;
    align-items: center;
}
.successful-upload-item span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.successful-upload-item i:last-child {
    flex-shrink: 0; /* Verhindert, dass das Icon schrumpft */
}

/* Animation für den Haken, wenn er erscheint */
@keyframes success-bounce {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

#uploaded-file-name {
    font-size: 0.9em;       /* Etwas kleiner als der Rest */
    font-weight: 500;
    
    /* Verhindert, dass der Name zu lang wird */
    max-width: 250px;       /* Breite begrenzen */
    overflow: hidden;         /* Überlauf abschneiden */
    text-overflow: ellipsis;  /* Mit "..." am Ende */
    white-space: nowrap;      /* Nicht umbrechen */
    
    display: inline-block;  /* Nötig für ellipsis */
    vertical-align: middle; /* Zentriert es schön neben den Icons */
}

.remove-file-btn {
    cursor: pointer;
    color: #6c757d; /* Standard-Icon-Grau */
    transition: color 0.2s ease;
}

.remove-file-btn:hover {
    color: #dc3545; /* Rot beim Darüberfahren */
}

/* * Visuelles Feedback, wenn eine Datei über
 * den '.floating-input-area'-Container gezogen wird.
*/
.floating-input-area.drag-over {
    /* * Erzeugt einen "Overlay"-Effekt.
     * Passt die Farbe an dein Design an.
    */
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.5) inset;
    background-color: rgba(0, 123, 255, 0.05);
}

/* * Optional: Zeigt einen Text im Overlay an.
 * (Erfordert, dass .floating-input-area position: relative hat)
*/
.floating-input-area.drag-over::before {
    content: "PDF hier ablegen";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 10;
    border-radius: 8px;
}

.tool-call-container {
    border-radius: 12px;
    padding: 8px;
    animation: slideInFromLeft 0.4s ease-out;
    overflow: hidden;
    position: relative;
}

.tool-call-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

.tool-call-search {
}

.tool-call-fetch {
}

.tool-call-analyze {
}

.tool-call-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-call-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 20px;
}

.icon-pulse {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

.tool-call-content {
    flex: 1;
    min-width: 0;
}

.tool-call-text {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.tool-call-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: progressMove 1.5s ease-in-out infinite;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes progressMove {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}