/* search.css -- header game-search dropdown (pairs with search.js).
   Overrides the old .result_search / .not_found styling in main.css. */

.search-input .result_search.search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    width: 400px;
    max-width: min(400px, calc(100vw - 32px));
    max-height: 62vh;
    display: block;
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #12141c;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}

.search-input .result_search.search-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

/* scrollbar */
.result_search.search-panel::-webkit-scrollbar { width: 9px; }
.result_search.search-panel::-webkit-scrollbar-track { background: transparent; }
.result_search.search-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    border: 2px solid #12141c;
}

/* result row -- the leading .result_search a{} overrides here undo the old
   card styling from main.css (height:150px, flex-basis:23%, scale hover) */
.result_search.search-panel a.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 10px;
    text-decoration: none;
    color: #e9eaf2;
    scroll-margin: 8px;
    transition: background 0.12s ease;
}

.result_search.search-panel a.search-item:hover {
    scale: 1;
}

.result_search.search-panel .search-item + .search-item {
    margin-top: 1px;
}

.result_search.search-panel .search-item:hover,
.result_search.search-panel .search-item.is-active {
    background: rgba(255, 255, 255, 0.08);
}

.result_search.search-panel .search-item.is-active {
    box-shadow: inset 0 0 0 1px rgba(0, 242, 254, 0.4);
}

.result_search.search-panel .search-thumb {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    flex: 0 0 48px;
}

.result_search.search-panel .search-thumb img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    display: block;
}

.search-name {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-name mark {
    padding: 0;
    background: transparent;
    color: #00f2fe;
    font-weight: 700;
}

.search-cat {
    flex: 0 0 auto;
    margin-left: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.search-msg,
.search-more {
    padding: 16px 12px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.search-more {
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 12px;
}

/* old sibling, no longer used */
.search-input .not_found { display: none !important; }

@media (max-width: 991px) {
    .search-input .result_search.search-panel {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        max-height: 70vh;
    }
}
