﻿/* ===== app-search.css (Fav4Selector) – ändert sich öfter =====
   Suche über Gebete und Buch-Apps: Suchfeld, Bücher-Kacheln, Trefferzahl, Trefferliste. Nach app-base.css. */

/* ===== Suche über Gebete und Buch-Apps (LibrarySearch) ===== */
.lib-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 30px 0 6px;
    padding: 0 12px;
    background: white;
    border: 1px solid #c9d2e0;
    border-radius: 22px;
}

    .lib-search:focus-within {
        border-color: #1e5fbf;
    }

.lib-search__icon {
    font-size: 0.95rem;
}

.lib-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 10px 0;
    font: inherit;
    font-size: 1rem;
    background: transparent;
}

.lib-search__clear {
    border: 0;
    background: transparent;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
}

/* Gebete und Buch-Apps: Knöpfe wie die Karten der Apps, so viele nebeneinander, wie in die Breite passen */
.lib-books {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.lib-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Die ganze Kachel ist der Knopf zur App */
.lib-book {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    box-sizing: border-box;
    padding: 8px 10px;
    background: white;
    border-top: 4px solid brown;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    color: inherit;
    text-decoration: none;
}

a.lib-book {
    cursor: pointer;
}

    a.lib-book:hover {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    }

.lib-cell--open .lib-book {
    outline: 2px solid #1e5fbf;
    background: #eef4ff;
}

.lib-book--soon {
    opacity: 0.6;
}

.lib-book__icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: brown;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lib-book__name {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;
}

.lib-book__soon {
    position: absolute;
    right: 8px;
    bottom: 3px;
    font-size: 0.7rem;
    color: #b26a00;
}

/* Trefferzahl unter der Kachel: Link, Klick öffnet die Liste */
.lib-cell__hits {
    text-align: center;
    min-height: 1.2em;
}

.lib-hits {
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e5fbf;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.lib-hits--none {
    color: #999;
    font-weight: 400;
    text-decoration: none;
    cursor: default;
}

/* Liste der Treffer eines Buchs */
.lib-panel {
    margin-top: 10px;
    background: white;
    border: 1px solid #c9d7ef;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.lib-panel__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #e3e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e5fbf;
}

.lib-panel__close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #888;
    cursor: pointer;
    font-size: 0.9rem;
}

.lib-panel__rows {
    max-height: 360px;
    overflow-y: auto;
}

.lib-row {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 7px 12px;
    border-bottom: 1px solid #f0f2f6;
    font-size: 0.85rem;
    color: #222;
    text-decoration: none;
}

    .lib-row:hover {
        background: #f5f8fd;
    }

.lib-row__nr {
    flex: 0 0 34px;
    font-weight: 600;
    color: #1e5fbf;
}

/* Hit outside the texts: kind instead of the Nr. (Kategorie, Teil, Erläuterung …) */
.lib-row__nr--kind {
    flex: 0 0 auto;
    min-width: 34px;
    max-width: 90px;
    font-size: 0.75rem;
    color: #8a5a00;
}

.lib-row__text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: Georgia, "Times New Roman", serif;
}

    .lib-row__text mark {
        background: #ffe58a;
        padding: 0 1px;
    }

.lib-panel__all {
    display: block;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #1e5fbf;
    text-decoration: none;
}
