/* ===========================================================================
   search_ui.css — estilos del componente unico de buscadores y filtros
   (static/js/search_ui.js). Lo cargan el panel y el portal de fiscalizacion;
   no depende de las variables de ninguno de los dos.
=========================================================================== */
.sui-field { position: relative; display: block; width: 100%; }
.sui-field > input { width: 100%; box-sizing: border-box; padding-right: 34px; }

/* "x" dentro del campo, a la derecha. Solo se ve si hay texto. */
.sui-clear {
    position: absolute; top: 0; right: 0; height: 100%; width: 32px;
    display: flex; align-items: center; justify-content: center;
    padding: 0; border: 0; background: transparent; cursor: pointer;
    color: #64748b; font-size: 18px; line-height: 1;
}
.sui-clear:hover { color: #0f172a; }
.sui-clear[hidden], .sui-reset[hidden], .sui-menu[hidden] { display: none !important; }

/* Desplegable de sugerencias. */
.sui-menu {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 100;
    margin: 0; padding: 0; list-style: none; text-align: left;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); max-height: 300px; overflow-y: auto;
}
.sui-opt {
    display: flex; flex-direction: column; gap: 2px; padding: 8px 12px;
    cursor: pointer; border-bottom: 1px solid #f1f5f9;
}
.sui-opt:last-child { border-bottom: none; }
.sui-opt:hover, .sui-opt.is-active { background: #eff6ff; }
.sui-name { font-size: 14px; font-weight: 600; color: #0f172a; }
.sui-meta { font-size: 12px; color: #64748b; }
.sui-empty { padding: 10px 12px; font-size: 13px; color: #64748b; }

/* "Limpiar filtros": boton secundario discreto, igual en todas las vistas. */
.sui-reset {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px;
    background: #fff; color: #334155; font: inherit; font-size: 13px;
    cursor: pointer; white-space: nowrap;
}
.sui-reset:hover { background: #f1f5f9; }

/* Buscador sobre una tabla ya cargada (Enrolamientos, Alertas). */
.sui-list-search { max-width: 420px; margin: 0 0 12px; }
.card-header + .sui-list-search { padding: 0 16px; }
