/* Equipment plates. Port coordinates are shared with the wiring-sheet export. */
.world .node {
  --plate-ink: #152b36;
  --plate-accent: #537787;
  --plate-edge: #aebfc4;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: var(--plate-ink);
  box-shadow: inset 0 0 0 1px var(--plate-edge), 0 3px 7px #142b3615;
  isolation: isolate;
}
.node-key, .node-copy, .node-heading { pointer-events: none; }
.node-key {
  position: absolute;
  inset: 8px 11px auto;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 18px;
  font: 600 11px/1.1 var(--sans);
}
.node-key::before {
  content: "";
  width: 12px;
  height: 4px;
  border-radius: 2px;
  background: var(--plate-accent);
  flex: none;
}
.node-ref {
  font: 650 11px/1 var(--mono);
  color: #30434c;
}
.node-class {
  margin-inline-start: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #49616b;
}
.node-warning {
  flex: none;
  border-radius: 3px;
  width: 15px;
  text-align: center;
  background: #ffe0a5;
  color: #702d00;
  font: 800 12px/15px var(--mono);
}
.world .node-heading {
  position: absolute;
  top: 29px;
  left: 1px;
  right: 1px;
  height: 61px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px 6px 8px;
  border-bottom: 1px solid #d9e3e6;
}
.world .node-heading::after { content: none; }
.world .node-icon {
  width: 66px;
  height: 50px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  box-shadow: none;
}
.world .node-icon svg { display: block; width: 100%; height: 100%; }
.node-copy { min-width: 0; }
.world .node-heading strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--plate-ink);
  font: 720 17px/1.08 var(--sans);
  letter-spacing: -.025em;
}
.node-quantity { white-space: nowrap; }
.world .node-meta {
  display: block;
  padding: 0;
  margin-top: 3px;
  color: #49616b;
  font: 550 12px/1.1 var(--sans);
}
.world .port {
  width: 30px;
  height: 22px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.world .port[data-polarity="+"] { --wire: #a44332; }
.world .port[data-polarity="-"] { --wire: #276484; }
.world .port[data-polarity="signal"] { --wire: #866014; }
.world .port::after {
  width: 11px;
  height: 11px;
  box-sizing: border-box;
  background-color: white;
  border: 2px solid var(--wire);
}
.world .port[data-wire-occupied]::after { background-color: var(--wire); }
.world .port[data-polarity="signal"]::after { border-radius: 3px; }
.world .port .port-label {
  color: var(--wire);
  max-width: 93px;
  font: 650 12px/1.2 var(--mono);
}
.world .port[data-side="left"] .port-label { left: 26px; }
.world .port[data-side="right"] .port-label { right: 26px; }
.world .node:hover { --plate-edge: #77949f; }
.world .node.is-selected { outline: 3px solid #097969; outline-offset: 2px; }
.world .node.is-wire-end:not(.is-selected) {
  --plate-edge: #138771;
  box-shadow: inset 0 0 0 2px var(--plate-edge), 0 3px 7px #142b3615;
}
.world .port:is(:focus-visible, :hover, [aria-pressed="true"])::after {
  box-shadow: 0 0 0 3px #83d1bf;
}
.world .port[data-wire-snap]::after { box-shadow: 0 0 0 var(--wire-snap-ring, 4px) #138771; }
.world[data-detail="compact"] .node-ref,
.world[data-detail="compact"] .node-class { font-size: 12px; }
.world[data-detail="overview"] .node-class,
.world[data-detail="overview"] .node-key,
.world[data-detail="overview"] .node-meta { visibility: hidden; }
.world[data-detail="overview"] .node-heading {
  top: 5px; height: 85px; grid-template-columns: 78px minmax(0, 1fr); gap: 5px;
}
.world[data-detail="overview"] .node-icon { width: 78px; height: 61px; }
.world[data-detail="overview"] .node-heading strong { font-size: 21px; line-height: 1.04; }
.world[data-detail="overview"] .node:not(.is-selected):not(.is-wire-end) .port-label { visibility: hidden; }
.viewport.is-wiring .world[data-detail="overview"] .port-label { visibility: visible; }
