/* boolean-chips — estilos del widget de operadores del buscador avanzado */
.boolean-chips { width: 100%; }

.bc-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: text;
  font-size: 14px;
  line-height: 1.3;
}
.bc-box:focus-within { border-color: #66afe9; box-shadow: 0 0 4px rgba(102,175,233,.45); }

.bc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  white-space: nowrap;
}
.bc-chip-label { font-weight: 500; }
.bc-chip-x { cursor: pointer; font-weight: 700; opacity: .7; }
.bc-chip-x:hover { opacity: 1; }

/* término: neutro */
.bc-term { background: #e3e7ea; color: #333; border: 1px solid #d3d9de; }

/* operadores: color distinto */
.bc-op { color: #fff; font-weight: 700; letter-spacing: .3px; }
.bc-op-AND { background: #2f6fb0; }   /* azul */
.bc-op-OR  { background: #3a9d5d; }   /* verde */
.bc-op-NOT { background: #c0392b; }   /* rojo */
.bc-op .bc-chip-x { color: #fff; }

/* input interno: SIEMPRE transparente y sin recuadro propio
   (con !important para ganarle a las reglas globales de input del sitio) */
.boolean-chips .bc-input {
  flex: 1 1 90px;
  min-width: 80px;
  border: none !important;
  border-radius: 0 !important;
  outline: none !important;
  padding: 4px 2px !important;
  margin: 0 !important;
  font-size: 14px;
  font-weight: 400;
  background: transparent !important;
  box-shadow: none !important;
  color: #000;
}

/* "?" de ayuda, inline al final del campo (no agrega fila) */
.bc-help {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #b8bcc0; color: #fff;
  font-size: 12px; font-weight: 700;
  cursor: help;
}

/* controles bajo el input: checks (izquierda) + operadores (derecha) */
.bc-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
/* el slot NO toca el layout interno de los checkboxes (float del sitio);
   solo los contiene a la izquierda. El clearfix contiene el float. */
.bc-slot { flex: 1 1 auto; min-width: 0; }
.bc-slot::after { content: ""; display: block; clear: both; }

.bc-tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.bc-op-btn {
  border: 1px solid #ccc; background: #f7f7f7; border-radius: 4px;
  padding: 2px 10px; font-size: 12px; font-weight: 700; cursor: pointer; color: #444;
}
.bc-op-btn:hover { background: #eee; }
.bc-op-btn.bc-op-AND { border-color: #2f6fb0; color: #2f6fb0; background:#f7f7f7; }
.bc-op-btn.bc-op-OR  { border-color: #3a9d5d; color: #3a9d5d; background:#f7f7f7; }
.bc-op-btn.bc-op-NOT { border-color: #c0392b; color: #c0392b; background:#f7f7f7; }

.bc-error { color: #c0392b; font-size: 12px; margin-top: 4px; }

/* =========================================================================
   MODO LIGHT (buscador público): se mimetiza con el campo original
   (div#div_buscador_avanzado input => gris #f0f0f0, redondeado, sin borde),
   para cambiar lo mínimo la UI que ya existía.
   ========================================================================= */
.boolean-chips--light .bc-box {
  background: #f0f0f0;
  border: none;
  border-radius: 5px;
  padding: 2px 12px;
  min-height: 41px;
}
.boolean-chips--light .bc-box:focus-within {
  border: none;
  box-shadow: none;
}
.boolean-chips--light .bc-help { background: #c9cdd1; }
