/* ---- Finder Flyout – vertikaler Tab links ---- */

/* Ausklappbares Panel */
.finder-flyout__fixed {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999998; /* 1 unter Easy TOC (999999) */
    width: auto;
    max-width: 100%;
}

.finder-flyout__fixed.hide {
    -webkit-transition: opacity 0.3s linear, left 0.3s cubic-bezier(0.4, 0, 1, 1);
    -ms-transition:     opacity 0.3s linear, left 0.3s cubic-bezier(0.4, 0, 1, 1);
    -o-transition:      opacity 0.3s linear, left 0.3s cubic-bezier(0.4, 0, 1, 1);
    transition:         opacity 0.3s linear, left 0.3s cubic-bezier(0.4, 0, 1, 1);
    left: -100%;
}

.finder-flyout__fixed.show {
    -webkit-transition: left 0.3s linear;
    -moz-transition:    left 0.3s linear;
    -o-transition:      left 0.3s linear;
    transition:         left 0.3s linear;
    left: 0;
}

/* Panel-Inhalt */
.finder-flyout__sidebar {
    position: relative;
    top: auto;
    box-shadow: 1px 1px 10px 3px rgb(0 0 0 / 20%);
    box-sizing: border-box;
    padding: 20px 30px;
    background: #fff;
    margin-left: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 200px;
}

/* Titelleiste im Panel */
.finder-flyout__title-bar {
    background-color: #fff;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    width: 100%;
    position: absolute;
    height: auto;
    top: 0;
    left: 0;
    z-index: 9999;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.finder-flyout__title {
    font-weight: 600;
    font-size: 18px;
    color: #111;
}

.finder-flyout__close {
    -webkit-appearance: none;
    padding: 0;
    cursor: pointer;
    background: 0 0;
    border: 0;
    font-size: 30px;
    font-weight: 600;
    line-height: 1;
    position: relative;
    color: #111;
    top: -2px;
    text-decoration: none;
}

/* Abstand für den Titel */
.finder-flyout__content {
    margin-top: 65px;
    padding: 0;
}

.finder-flyout__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.finder-flyout__list li {
    margin-bottom: 8px;
}

.finder-flyout__list li:last-child {
    margin-bottom: 0;
}

.finder-flyout__list a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* SVG Icon: fest 15×15px, skaliert proportional */
.finder-flyout__icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.finder-flyout__icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

/* Alle SVG-Kindelemente erben currentColor –
   überschreibt auch hardcodierte fill-Attribute (z.B. fill="rgb(0,0,0)") */
.finder-flyout__icon svg path,
.finder-flyout__icon svg circle,
.finder-flyout__icon svg rect,
.finder-flyout__icon svg polygon,
.finder-flyout__icon svg g {
    fill: currentColor !important;
}

.finder-flyout__list a:hover {
    text-decoration: underline;
}

.finder-flyout__empty {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.finder-flyout__empty a {
    color: #2271b1;
}

/* Vertikaler Tab-Knopf */
.finder-flyout__tab {
    position: fixed;
    left: 0;
    top: 8%; /* Standard-Position; JS überschreibt wenn TOC sichtbar */
    visibility: hidden; /* Wird erst nach JS-Positionierung eingeblendet */
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px 15px 10px;
    box-shadow: 1px -5px 10px 5px rgb(0 0 0 / 10%);
    background-color: #fff;
    color: #111;
    display: inline-grid;
    line-height: 1.4;
    border-radius: 0 10px 10px 0;
    z-index: 999998;
}

.finder-flyout__tab-arrow {
    font-size: 18px;
}

.finder-flyout__tab-text {
    font-size: 13px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Tab ausblenden wenn Panel offen ist */
.finder-flyout__tab.hidden {
    z-index: -1;
}

/* Beide Tabs ausblenden wenn ein Overlay (Menü / FacetWP) offen ist */
.finder-force-hidden {
    visibility: hidden !important;
}

@media screen and (max-device-width: 640px) {
    .finder-flyout__sidebar {
        min-width: auto;
    }
    .finder-flyout__sidebar.show {
        padding-top: 35px;
    }
}
