/* AJAX live search dropdown (home page search box).
 * Sits inside .searchbox-form (already position: relative) and stretches the
 * full width of the input; it opens downward and never overflows the
 * viewport (scrollable, capped to the space under the input, mobile first).
 */

.nc-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    background-color: var(--dl-bg-white, #fff);
    border: 2px solid transparent;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: min(60vh, 340px);
    z-index: 50;
    text-align: left;
    text-transform: none;
}

.nc-search-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    min-height: 52px;
    transition: background-color 0.15s ease;
}

.nc-search-option--active,
.nc-search-option:hover {
    background-color: var(--nc-grey-100, #f1f5f9);
}

.nc-search-thumb {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
    background-color: var(--nc-grey-100, #f1f5f9);
}

.nc-search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* No photo: initials tile (fallback avatar, theme style). */
.nc-search-thumb--fallback {
    display: grid;
    place-items: center;
    color: var(--dl-primary-color, #1cbbb4);
    font-weight: 700;
    font-size: 15px;
}

.nc-search-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.nc-search-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: #212529;
    overflow-wrap: anywhere;
}

.nc-search-reg {
    font-size: 12.5px;
    font-weight: 500;
    color: #6b7280;
}

.nc-search-state {
    padding: 12px 10px;
    font-size: 14px;
    color: #6b7280;
    list-style: none;
}

/* Accessibility: the highlighted row keeps an outline (never outline: none). */
.nc-search-option--active:focus-visible {
    outline: 2px solid var(--dl-primary-color, #1cbbb4);
    outline-offset: -2px;
}
