/* =============================================================================
   CAMPUL DE LOCALITATE CU COMPLETARE AUTOMATA
   partials/locality_field.php + js/bt-locality.js

   Doua infatisari:
     .bt-loc--plain  camp de sine statator, cu chenar (modalul de filtre)
     .bt-loc--bare   fara chenar, in bara de cautare, unde chenarul il da
                     campul din jur
   ========================================================================== */

.bt-loc { position: relative; }

.bt-loc-control {
    display: flex;
    align-items: center;
    gap: 9px;
}

/* ---- varianta cu chenar ---- */
.bt-loc--plain .bt-loc-control {
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    transition: border-color .15s ease;
}
.bt-loc--plain .bt-loc-control:focus-within { border-color: #16a34a; }
.bt-loc-icon { color: #94a3b8; font-size: 14px; flex-shrink: 0; }

.bt-loc-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0;
    font-family: inherit;
    font-size: 14.5px;
    color: #0f172a;
}
.bt-loc-input:focus { outline: none; }
.bt-loc-input::placeholder { color: #94a3b8; }

.bt-loc-clear {
    flex-shrink: 0;
    width: 22px; height: 22px;
    display: inline-grid; place-items: center;
    padding: 0;
    border: 0; border-radius: 50%;
    background: transparent; color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.bt-loc-clear:hover { background: #f1f5f9; color: #0f172a; }
.bt-loc-clear[hidden] { display: none; }

/* ---- varianta din bara de cautare ---- */
/* Acolo chenarul, eticheta si pictograma vin de la `.bt-search-field`; campul
   nostru trebuie doar sa se aseze in el si sa mosteneasca culorile, ca sa
   mearga si pe bara inchisa la culoare din hero. */
.bt-loc--bare .bt-loc-control { padding: 0; }
.bt-loc--bare .bt-loc-input {
    font-size: 15px;
    color: inherit;
}
.bt-loc--bare .bt-loc-input::placeholder { color: inherit; opacity: .65; }
.bt-loc--bare .bt-loc-clear { color: inherit; opacity: .7; }
.bt-loc--bare .bt-loc-clear:hover { background: rgba(127, 127, 127, .18); opacity: 1; }

/* ---- lista de sugestii ----
   `fixed`, asezata din JS: orice parinte cu overflow — bara de cautare,
   modalul de filtre — ar taia-o daca ar fi absoluta. `z-index` peste modalul
   de filtre (1300), din acelasi motiv ca la bt-select. */
.bt-loc-list {
    position: fixed;
    z-index: 2100;
    margin: 0;
    padding: 6px;
    list-style: none;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}
.bt-loc-list[hidden] { display: none; }

.bt-loc-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
}
.bt-loc-item:hover,
.bt-loc-item.is-active { background: #f1f8f4; }

.bt-loc-name {
    font-size: 14.5px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Judetul e dezambiguizarea, nu raspunsul: se citeste, dar nu trage ochiul */
.bt-loc-county {
    flex-shrink: 0;
    font-size: 12.5px;
    color: #94a3b8;
}

.bt-loc-empty {
    padding: 12px;
    font-size: 13.5px;
    color: #94a3b8;
    text-align: center;
}
