/*
 * ngsSearch.css — стили inline @/# typeahead (+ палитра Shift+F, Фаза 2).
 * Грузится в оба документа (ngs.php и comments.php). Нейтральная тёмно-серая тема приложения,
 * акценты — минимальные (тонкая полоска у активной строки).
 */

.ngs-typeahead {
    position: fixed;
    z-index: 100030;                 /* выше комментов/модалок, ниже interaction-shield */
    min-width: 240px;
    max-width: 360px;
    max-height: 280px;
    overflow-y: auto;
    padding: 5px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(38, 40, 46, 0.98), rgba(30, 32, 37, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: inherit;
    color: #eef3ff;
    -webkit-user-select: none;
    user-select: none;
}

.ngs-typeahead::-webkit-scrollbar { width: 8px; }
.ngs-typeahead::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 8px; }

.ngs-ta-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
}

.ngs-ta-item + .ngs-ta-item { margin-top: 1px; }

.ngs-ta-item:hover { background: rgba(255, 255, 255, 0.05); }

.ngs-ta-item.is-active {
    background: rgba(255, 255, 255, 0.075);
    box-shadow: inset 2px 0 0 rgba(198, 219, 78, 0.55);   /* тонкий лаймовый акцент слева — единственный «цвет» */
}

.ngs-ta-ic {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.06);
    color: #aeb6c4;
    font-size: 11px;
}

.ngs-ta-main {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 600;
    color: #e7ecf6;
}

.ngs-ta-sub {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: auto;
    padding-left: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #8b93a3;
}

.ngs-ta-item.is-active .ngs-ta-ic { color: #c6db4e; }


/* ================================ Палитра Shift+F ================================ */
.ngs-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 100040;
    display: flex;
    justify-content: center;
    align-items: center;          /* по центру экрана */
    padding: 16px;
    box-sizing: border-box;
    background: rgba(12, 13, 16, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.ngs-palette-card {
    width: min(580px, calc(100vw - 32px));
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(40, 42, 48, 0.99), rgba(31, 33, 38, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.12);
    /* box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05); */
    color: #eef3ff;
    font-family: inherit;
}

.ngs-palette-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ngs-palette-input-wrap i { color: #8b93a3; font-size: 15px; }
.ngs-palette-input {
    flex: 1 1 auto;
    background: transparent;
    border: 0;
    outline: 0;
    color: #eef3ff;
    font-size: 16px;
    font-weight: 500;
}
.ngs-palette-input::placeholder { color: #8b93a3; }

.ngs-palette-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px; }
.ngs-palette-list::-webkit-scrollbar { width: 9px; }
.ngs-palette-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 9px; }

.ngs-palette-empty { padding: 22px 14px; text-align: center; color: #8b93a3; font-size: 13px; }

.ngs-palette-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
}
.ngs-palette-item + .ngs-palette-item { margin-top: 1px; }
.ngs-palette-item:hover { background: rgba(255, 255, 255, 0.05); }
.ngs-palette-item.is-active {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 2px 0 0 rgba(198, 219, 78, 0.55);
}
.ngs-palette-item.is-active .ngs-ta-ic { color: #c6db4e; }

.ngs-palette-main {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 600;
    color: #e7ecf6;
}
.ngs-palette-sub {
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: #8b93a3;
}
.ngs-palette-tag {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #aeb6c4;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ngs-palette-hint {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding: 8px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: #8b93a3;
}
.ngs-palette-hint b { color: #c2c9d6; font-weight: 700; }
