/**
 * Arquivo: public/assets/jlg-search.css
 * Plugin:  Jet Listing Grid
 * Módulo:  JLG Search (busca com dropdown)
 * Prefixo: jlgsb-  (isolado — não colide com jlg-, jlg-filter-, fqr-)
 */

.jlgsb-wrap { display: block; width: 100%; }

.jlgsb-label { display: block; margin-bottom: 4px; }

/* ⚠️ NÃO REMOVER — position:relative é a âncora do dropdown absoluto. */
.jlgsb-field { position: relative; width: 100%; }

.jlgsb-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 38px 10px 12px; /* espaço à direita reservado para o botão "X" */
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font-size: 14px;
    line-height: 1.4;
}

.jlgsb-input:focus { outline: none; border-color: #2f80ed; }

/* "X" para limpar a busca — apenas o glifo, SEM moldura/fundo/borda.
   Especificidade .jlgsb-field .jlgsb-clear para vencer estilos de tema. */
.jlgsb-field .jlgsb-clear {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: none;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    color: #999;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.jlgsb-field .jlgsb-clear:hover { color: #555; background: none; }

.jlgsb-field.jlgsb-has-value .jlgsb-clear { display: inline-block; }

/* Dropdown de sugestões */
.jlgsb-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 4px;
    max-height: 340px;
    overflow-y: auto;
    background: #fff;
    border: 0px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
}

.jlgsb-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 0px solid #f0f0f0;
    transition: background .12s;
}

.jlgsb-item:last-child { border-bottom: none; }

.jlgsb-item:hover,
.jlgsb-item.is-active { background: #f5f7fa; }

.jlgsb-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin-bottom: 2px;
}

.jlgsb-item-snippet {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.jlgsb-item-snippet mark {
    background: #fff3a3;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.jlgsb-empty {
    padding: 12px;
    font-size: 13px;
    color: #888;
    text-align: center;
}
