.glossary-search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    z-index: 10000;
    /* Ensure the box itself is above subsequent siblings like nav */
}

.glossary-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff !important;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    /* Ensure it stays on top of everything */
    max-height: 300px;
    overflow-y: auto;
    display: none;
    /* Hidden by default */
    text-align: left;
}

.glossary-search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.glossary-search-results li {
    border-bottom: 1px solid #f0f0f0;
}

.glossary-search-results li:last-child {
    border-bottom: none;
}

.glossary-search-results a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 1rem;
}

.glossary-search-results a:hover,
.glossary-search-results a:focus {
    background: #f9f9f9;
    color: #008080;
    /* Theme teal */
    padding-left: 25px;
    /* Slight indent on hover */
}

.glossary-search-results .no-results {
    padding: 15px;
    color: #666;
    font-style: italic;
    background: #fafafa;
}

.glossary-search-spinner {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    display: none;
}