/* ================================================================
   <bm-tx-shape>: a TX shape's graph icon + its name (+ version).
   Shrinks inside flex rows; the name is cut with "…".
   ================================================================ */
bm-tx-shape { display: inline-flex; min-width: 0; max-width: 100%; flex: 0 1 auto; vertical-align: middle; }

.bm-tx-shape { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }

.bm-tx-shape__icon {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 19px; border-radius: 4px; overflow: hidden;
  background: var(--bm-surface-2, #F3F4F6); border: 1px solid var(--bm-border-subtle, #E5E7EB); box-sizing: border-box;
}
/* the graph framed: a visible border and a little room around it */
.bm-tx-shape__icon--img {
  width: 34px; height: 23px; padding: 2px; background: #FFFFFF;
  border: 1px solid var(--bm-text-muted, #6B7280); border-radius: 4px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .12);
}
.bm-tx-shape__icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bm-tx-shape__icon md-icon {
  margin: 0 !important; font-size: 13px !important; width: 13px !important; height: 13px !important;
  min-width: 13px !important; min-height: 13px !important; line-height: 13px !important; color: var(--bm-text-muted, #6B7280) !important;
}

.bm-tx-shape--lg .bm-tx-shape__icon { width: 56px; height: 35px; border-radius: 6px; }
.bm-tx-shape--lg .bm-tx-shape__icon--img { width: 62px; height: 40px; padding: 3px; }
.bm-tx-shape--lg .bm-tx-shape__icon md-icon {
  font-size: 20px !important; width: 20px !important; height: 20px !important;
  min-width: 20px !important; min-height: 20px !important; line-height: 20px !important;
}

.bm-tx-shape__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.bm-tx-shape__name { cursor: pointer; }
.bm-tx-shape--missing .bm-tx-shape__name { font-style: italic; color: var(--bm-text-muted, #6B7280); }
.bm-tx-shape__ver { flex-shrink: 0; }

/* hovering the icon: the graph at the icon's stored size */
md-tooltip.bm-tx-shape-tip .md-content { height: auto; max-width: none; padding: 6px; background: #FFFFFF; border: 1px solid var(--bm-border-subtle, #E5E7EB); box-shadow: 0 4px 16px rgba(17, 24, 39, .16); }
.bm-tx-shape-tip__img { display: block; width: 160px; height: 100px; object-fit: contain; padding: 4px; box-sizing: border-box;
  border: 1px solid var(--bm-text-muted, #6B7280); border-radius: 4px; }
