/* ============================================================
   FILE: css/07-search.css
   VERSION: 1.8
   LAST MODIFIED: March 10, 2026
   DESCRIPTION: Such-Styles (Sidebar & Ergebnisse).
                Vollständige Anbindung an das Variablen-System.
                Keine harten Farbcodes oder Pixel-Werte mehr.
   ============================================================ */

/* 1. SIDEBAR SUCHBOX (Desktop Sync mit H1) */
.sidebar-search {
    margin-top: 0 !important;
    margin-bottom: var(--sync-gap) !important; /* SYNC: 30px */
    padding: 0 !important;
}

.sidebar-search .search-form {
    display: flex !important;
    height: var(--sync-height-desktop) !important; /* SYNC: 36px */
    background: #ffffff;
    box-sizing: border-box !important;
    box-shadow: var(--sync-shadow) !important; /* SYNC: Schatten */
    border: 1px solid var(--primary-color) !important; /* SYNC: Dynamische Rahmenfarbe */
    overflow: hidden;
}

.sidebar-search .search-field {
    flex: 1;
    /* Höhe minus 2px für den Rahmen oben/unten */
    height: calc(var(--sync-height-desktop) - 2px) !important;
    border: none !important;
    background: transparent !important;
    padding: 0 12px !important;
    font-family: "Open Sans", sans-serif;
    font-size: 0.95rem;
    color: var(--text-color);
    outline: none;
    line-height: calc(var(--sync-height-desktop) - 2px) !important;
}

.sidebar-search .search-submit {
    width: 38px;
    height: calc(var(--sync-height-desktop) - 2px) !important;
    border: none !important;
    background-color: var(
        --primary-color
    ) !important; /* SYNC: Dynamische Buttonfarbe */
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    padding: 0;
}

.sidebar-search .search-submit::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #fff;
    font-size: 0.9rem;
}

/* 2. ERGEBNIS-LISTE (search.php) */
.search-results-page {
    min-height: 60vh; /* Verhindert hochspringenden Footer */
}

.search-summary {
    margin: 15px 0 var(--sync-gap) 0;
}

.search-count {
    font-family: "Open Sans", sans-serif;
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--primary-color) !important; /* SYNC: Dynamische Textfarbe */
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: var(--sync-gap); /* SYNC: 30px */
}

.search-result-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.search-result-title {
    margin: 0 0 5px 0 !important;
    font-size: 1.2rem !important;
}

.search-result-title a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
}

.search-result-title a:hover {
    color: var(--primary-color);
}

.search-result-snippet {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
}

/* Highlighting im Snippet */
.search-highlight {
    text-decoration: none !important;
    font-weight: bold;
    color: var(
        --primary-color
    ) !important; /* SYNC: Dynamische Highlightfarbe */
}

/* 3. LINK-DESIGN (Weiterlesen-Stil) */
.read-more-link {
    display: inline-block;
    margin-top: 8px;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--primary-color) !important; /* SYNC: Dynamische Linkfarbe */
}

.read-more-link:hover {
    text-decoration: underline;
}

/* 4. PAGINATION */
.search-pagination {
    margin-top: var(--sync-gap);
    padding-top: 20px;
}

.search-pagination .current {
    background-color: var(--primary-color) !important;
    color: #fff;
    padding: 5px 10px;
    font-weight: bold;
}
