/* Globale Suche (K-Bar) und Such-Button der Startseite */

.kbar {
    --kbar-accent: var(--dm-accent-theme-link, #2050b0);
}

.kbar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease-in-out, visibility 0.12s;
    z-index: 999;
}

.kbar {
    position: fixed;
    top: 22vh;
    left: 50%;
    width: min(580px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid #aaa;
    transform: translateX(-50%) scale(.96);
    opacity: 0;
    visibility: hidden;
    transition: all 0.12s ease-in-out;
    z-index: 1000;
    overflow: hidden;
    font-size: 16px;
}

.kbar-backdrop.visible,
.kbar.visible {
    opacity: 1;
    visibility: visible;
}

.kbar.visible {
    transform: translateX(-50%) scale(1);
}

.kbar-searchrow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid #aaa;
    color: #777;
}

.kbar-input,
.kbar-input:focus {
    /* überschreibt den globalen orangen input:focus-Hintergrund */
    flex: 1;
    min-width: 0;
    padding: 14px 0;
    border: none;
    outline: none;
    font-size: 17px;
    background: transparent;
    color: #222;
}

.kbar-kbd {
    display: inline-flex;
    gap: 3px;
    white-space: nowrap;
}

.kbar-kbd kbd {
    font-family: inherit;
    font-size: 12px;
    line-height: 1;
    padding: 3px 6px;
    border: 1px solid #d4d4d4;
    background: #f6f6f6;
    color: #555;
}

.kbar-results {
    list-style: none;
    margin: 0;
    padding: 0 0 6px 0;
    max-height: min(calc(76vh - 110px), 520px);
    overflow-y: auto;
}

.kbar-results:empty {
    display: none;
}

.kbar-group {
    /* wie li.oe_heading im Hauptmenü */
    margin: 10px 16px 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ddd;
    color: #666;
}

.kbar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    cursor: pointer;
}

.kbar-item.selected {
    background: #eee;
}

.kbar-icon {
    flex: none;
    display: flex;
    color: #888;
}

.kbar-item.selected .kbar-icon,
.kbar-item.selected .kbar-title {
    color: var(--kbar-accent);
}

.kbar-body {
    flex: 1;
    min-width: 0;
}

.kbar-results a.kbar-main,
.kbar-results a.kbar-main:visited {
    display: block;
    color: #222;
    text-decoration: none;
}

.kbar-title,
.kbar-desc {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kbar-title {
    line-height: 1.3;
}

.kbar-desc {
    font-size: 13px;
    color: #888;
}

.kbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.kbar-results a.kbar-action,
.kbar-results a.kbar-action:visited {
    /* wie Portal-Buttons: grauer Rahmen, Hover orange */
    font-size: 14px;
    line-height: 1.2;
    padding: 2px 7px;
    border: 1px solid #a0a0a0;
    background: #fff;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
}

.kbar-results a.kbar-action:hover,
.kbar-results a.kbar-action.kbar-selected {
    border-color: var(--dm-accent-link-hover, #d05020);
    color: var(--dm-accent-link-hover, #d05020);
}

.kbar-empty {
    padding: 18px 16px;
    color: #888;
    text-align: center;
}

.kbar-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 8px 16px;
    border-top: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
    color: #888;
}

.kbar-footer .kbar-kbd kbd {
    font-size: 11px;
    padding: 2px 5px;
}

/* Rechtsbündig über der Trennlinie der Startseiten-Überschrift (body > h1 in style.css) */
.kbar-launcher-wrap {
    position: absolute;
    left: 170px;
    top: 144px;
    width: 890px;
    text-align: right;
    z-index: 2;
}

.kbar-launcher {
    /* wie Portal-Buttons und die Aktionen im Dialog: grauer Rahmen, Hover orange */
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #a0a0a0;
    background: #fff;
    color: #222;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.kbar-launcher:hover,
.kbar-launcher:focus-visible {
    border-color: var(--dm-accent-link-hover, #d05020);
    color: var(--dm-accent-link-hover, #d05020);
    outline: none;
}
