/* Navbar page-search omnibox (menu-search-directive.js) */

.menu-search-nav {
    display: flex;
    align-items: center;
    margin-right: 14px;
}

.menu-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 260px;
    max-width: 100%;
}

.menu-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    pointer-events: none;
}

.menu-search-input {
    width: 100%;
    height: 34px;
    padding: 0 30px 0 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.menu-search-input:focus {
    border-color: #f39c12;
    background: rgba(255, 255, 255, 0.12);
}

.menu-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 13px;
}

.menu-search-clear:hover {
    color: #f39c12;
}

.menu-search-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #1e1e1e;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    padding: 6px 0;
    max-height: 60vh;
    overflow-y: auto;
    min-width: 280px;
}

.menu-search-group + .menu-search-group {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 4px;
    padding-top: 4px;
}

.menu-search-group-label {
    padding: 6px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.menu-search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

/* Highlight is driven entirely by the JS-controlled .active row (a single row at a
   time). The :hover rule below only NEUTRALISES the app-wide `a:hover { color: #F39C12 }`
   in site.css so the pointer never colours a second row. The .active rule is listed
   after it and has equal specificity, so it wins on the row that is both hovered and
   active. */
.menu-search-panel .menu-search-result:hover {
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
    text-decoration: none;
}

.menu-search-panel .menu-search-result.active {
    background: rgba(255, 255, 255, 0.06);
    color: #f39c12;
    text-decoration: none;
}

.menu-search-result-icon {
    width: 18px;
    text-align: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    flex: 0 0 auto;
}

.menu-search-panel .menu-search-result:hover .menu-search-result-icon {
    color: rgba(255, 255, 255, 0.7);
}

.menu-search-panel .menu-search-result.active .menu-search-result-icon {
    color: #f39c12;
}

.menu-search-result-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.menu-search-result-title {
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The title has no colour of its own and would otherwise inherit the row colour; some
   app-wide anchor styling tints that, so set it explicitly. Only the active row (the one
   under the cursor / keyboard selection) turns orange. !important + specificity guarantee
   this wins regardless of the global anchor rules. */
.menu-search-panel .menu-search-result .menu-search-result-title {
    color: rgba(255, 255, 255, 0.9) !important;
}

.menu-search-panel .menu-search-result.active .menu-search-result-title {
    color: #f39c12 !important;
}

.menu-search-result-crumb {
    font-size: 11px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-search-badge {
    flex: 0 0 auto;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    white-space: nowrap;
}

.menu-search-empty {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}
