﻿/* PANEL-BREITE wie Sidebar */
.sidebar {
    max-width: 100%;
}

/* Flex-Layout: Header fixiert, Tab-Inhalt füllt restliche Höhe und scrollt */
#sidebar-header {
    flex-shrink: 0;
}

.sidebar .simplebar-content > .sidebar-content {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sidebar .simplebar-content > .sidebar-content > .tab-content {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Alle Panes: Restplatz füllen und eigenständig scrollen */
#pane-bt,
#pane-csharp,
#pane-search {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
}

/* XML-Pane: Flex-Container, damit xmlTree die volle Höhe einnimmt */
#pane-xml {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

#pane-xml.active {
    display: flex;
    flex-direction: column;
}

#pane-xml > .xml-tree {
    flex: 1 1 0;
    min-height: 0;
}

/* Leichte Card-Optik */
.sidebar-card {
    border: 1px solid #e9ecef; /* <- wirkt: dezente Umrandung */
    border-radius: 10px; /* <- wirkt: weichere Ecken */
    background: #fff;
}

.search-wrap {
    padding: 6px;
}

/* Heller Chooser-Container */
.mode-switch-wrapper {
    background: #f1f3f5; /* <- wirkt: heller Bereich */
    padding: 6px;
    border-radius: 10px;
}

/* Tabs wie Segment-Control */
.mode-tabs {
    border-bottom: 0;
    gap: 4px;
    flex-wrap: nowrap;
}

.mode-tabs .nav-link {
    border: 0;
    border-radius: 8px;
    color: #495057;
    font-weight: 500;
    padding: .4rem .5rem;
    font-size: 0.82rem;
    white-space: nowrap;
    background: transparent; /* <- wirkt: inaktiv transparent */
}

.mode-tabs .nav-link:hover {
    background: #dee2e6;
}
/* <- wirkt: Hover */
.mode-tabs .nav-link.active {
    background: #343a40; /* <- wirkt: aktiver Tab dunkel */
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* Listenelement */
.result-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.35rem;
    padding-left: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease;
    outline: none;
    line-height: 1.2em;
}

.result-item:hover {
    background: #f8f9fa;
}

/* Keyboard-Fokus/Selection */
.result-item.is-active {
    background: #e7f1ff; /* <- wirkt: aktive Zeile per Keyboard */
    box-shadow: inset 0 0 0 2px #0d6efd;
}

.result-icon {
    width: 22px;
    text-align: center;
    color: #6c757d;
    margin-top: 3px;
}

.namespace {
    font-size: 0.8rem;
    color: #6c757d;
}
/* <- wirkt: dezente Sekundärinfo */

.scroll-area {
    max-height: 70vh;
    overflow-y: auto;
}

.hidden {
    display: none !important;
}
/* <- wirkt: Filter-Ausblendung */

/* Highlighting der Treffer */
mark.hit {
    padding-left: 0;
    padding-right: 0;
    border-radius: 3px;
    background: #fff3bf; /* <- wirkt: gelbliches Highlight */
}

/* "Keine Treffer" Box */
.no-results {
    border: 1px dashed #ced4da; /* <- wirkt: dezente Abgrenzung */
    border-radius: 10px;
    padding: 12px;
    color: #6c757d;
    background: #f8f9fa;
}

/* Section Header */
.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #6c757d;
    margin: 8px 0 6px 0;
    padding-left: 0.75rem;
}

/* Suchfeld Icon (Bootstrap only) */
.search-wrap {
    position: relative;
}

.search-wrap .fa-magnifying-glass {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.search-wrap.has-value .fa-magnifying-glass {
    opacity: 1;
}

.search-wrap input {
    padding-left: 0.75rem;
    padding-right: 2.25rem;
    transition: padding-left 0.15s ease;
}

.search-wrap.has-value input {
    padding-left: 2.25rem;
}

/* Clear-Button im Suchfeld */
.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.9rem;
    line-height: 1;
    border-radius: 50%;
}

.search-clear:hover {
    color: #212529;
    background: rgba(0, 0, 0, 0.06);
}


/* Default-Carets aus AdminKit ausblenden */
.sidebar [data-bs-toggle="collapse"]::after {
    display: none;
}

.facturx-tree-link:hover {
    text-decoration: none;
}