/* LZ-057: 2D Molecular Structure Depictions
   Shared styles for SmilesDrawer-rendered SVG containers */

.mol-depict {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 90px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  vertical-align: middle;
  cursor: default;
}

.mol-depict svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Size variants */
.mol-depict--lg {
  width: 200px;
  height: 150px;
}

.mol-depict--sm {
  width: 80px;
  height: 60px;
}

/* Hover tooltip — shows full SMILES on hover */
.mol-depict[data-smiles]:hover::after {
  content: attr(data-smiles);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1f2e;
  color: #9ca3af;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 100;
  pointer-events: none;
}

/* Error fallback — truncated SMILES text */
.mol-depict--error {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 9px;
  color: #4b5563;
  padding: 4px 6px;
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.mol-depict--error svg { display: none; }
