#search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#search-modal {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: min(600px, 90vw);
    background: var(--bg-color, #fff);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    padding: 1rem;
}

#search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: inherit;
    min-width: 0;
}

.search-hint {
    font-size: 0.75em;
    color: var(--muted-color, #888);
    white-space: nowrap;
    flex-shrink: 0;
}

#search-results {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

#search-results li {
    border-radius: 4px;
    cursor: pointer;
}

#search-results li + li {
    margin-top: 2px;
}

#search-results li:hover,
#search-results li[aria-selected="true"] {
    background: var(--hover-bg, rgba(0, 0, 0, 0.06));
}

#search-results a {
    display: block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: inherit;
}

.search-result-title {
    display: block;
    font-weight: 600;
}

.search-result-summary {
    display: block;
    font-size: 0.85em;
    color: var(--muted-color, #888);
    margin-top: 0.15em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-no-results {
    padding: 0.5rem 0.75rem;
    color: var(--muted-color, #888);
}

