/* Поисковая строка на главной */
.search-bar {
    display: flex;
    gap: 0.4em;
    margin: 1.2em 0;
}
.search-bar input[type="search"] {
    flex: 1;
    padding: 0.45em 0.7em;
    font-size: 1em;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #fff;
    color: #222;
    outline: none;
}
.search-bar input[type="search"]:focus {
    border-color: #2a4d7a;
    box-shadow: 0 0 0 2px #d0dff0;
}
.search-bar button {
    padding: 0.45em 1em;
    font-size: 1em;
    background: #2a4d7a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}
.search-bar button:hover {
    background: #1a3a5c;
}

/* ── Страница поиска ────────────────────────────────────────────────────── */

.search-page-bar {
    display: flex;
    gap: 0.4em;
    margin-bottom: 1.4em;
}
.search-page-bar input[type="search"] {
    flex: 1;
    padding: 0.5em 0.8em;
    font-size: 1.05em;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #fff;
    color: #222;
    outline: none;
}
.search-page-bar input[type="search"]:focus {
    border-color: #2a4d7a;
    box-shadow: 0 0 0 2px #d0dff0;
}
.search-page-bar button {
    padding: 0.5em 1.2em;
    font-size: 1em;
    background: #2a4d7a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.search-page-bar button:hover { background: #1a3a5c; }

.search-status {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: #555;
    font-size: 0.9em;
    margin-bottom: 1em;
    min-height: 1.4em;
}
.search-status.error { color: #c00; }

.search-spinner {
    display: none;
    width: 1em;
    height: 1em;
    border: 2px solid #ccc;
    border-top-color: #2a4d7a;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
.search-status.loading .search-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.search-results { list-style: none; padding: 0; margin: 0; }

.search-result {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.9em 1em;
    margin-bottom: 0.8em;
    background: #fff;
}
.search-result-title {
    font-size: 1em;
    font-weight: bold;
    color: #2a4d7a;
    margin: 0 0 0.25em;
}
.search-result-meta {
    font-size: 0.82em;
    color: #555;
    margin-bottom: 0.4em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
    align-items: center;
}
.search-result-meta a {
    color: #1a0dab;
    text-decoration: none;
}
.search-result-meta a:hover { text-decoration: underline; }
.search-result-score {
    background: #e8eaf6;
    color: #2a4d7a;
    border-radius: 3px;
    padding: 0 0.4em;
    font-size: 0.9em;
}
.search-result-quote {
    font-size: 0.9em;
    color: #333;
    line-height: 1.5;
    border-left: 3px solid #2a4d7a;
    padding-left: 0.7em;
    margin: 0;
}
