/* Header asset search — templates/includes/asset_search_nav.html (the glass in
   the navbar) + asset_search_modal.html (the field + results, at every width).
   Loaded sitewide from base.html. */

/* ---- Magnifying glass (navbar chrome) ---- */

.asset-search-toggle {
    background: none;
    border: none;
    color: #ffffff;
    padding: 0.4rem 0.5rem;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.asset-search-toggle:hover {
    color: #228B22;
}

.asset-search-toggle:focus {
    outline: none;
    box-shadow: none;
}

@media (max-width: 576px) {
    .asset-search-toggle {
        font-size: 1.05rem;
        padding: 0.25rem 0.4rem;
    }
}

/* ---- Results list (inside the modal body) ---- */

.asset-search-results {
    display: none;
    margin-top: 0.5rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.asset-search-results.is-open {
    display: block;
}

.asset-search-results a.asset-search-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    color: #212529;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #e9ecef;
}

.asset-search-results a.asset-search-item:last-child {
    border-bottom: none;
}

.asset-search-results a.asset-search-item:hover,
.asset-search-results a.asset-search-item.is-active {
    background-color: #e9f5e9;
    color: #212529;
}

/* Bootstrap's code font (`--bs-font-monospace`, what <code>/<kbd>/<pre> use)
   rather than the Courier New of `.tabular-nums` in asset_tables.css. Bootstrap
   is loaded sitewide by base.html so the variable is always defined; the
   literal stack is spelled out as a fallback in case that ever changes. */
.asset-search-symbol {
    font-family: var(--bs-font-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
                     "Liberation Mono", "Courier New", monospace);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 4.5em;
}

.asset-search-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-search-type {
    flex-shrink: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.6;
}

.asset-search-empty {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}
