/* Attach points and mates (assembly.js): the edit card's links and attach points, and the hint
   line on the stage while a pick is armed. (Their Add ▾ items are edit.css's menu.) */
.sv-asm {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.sv-asm__row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.sv-asm__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-asm__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border: 2px solid var(--sv-accent);
  border-radius: 50%;
}

#viewer .sv-asm__name,
#viewer .sv-asm__mm {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--sv-border);
  border-radius: 6px;
  background: var(--sv-surface);
  font: inherit;
  font-size: 13px;
}

#viewer .sv-asm__mm {
  flex: none;
  width: 72px;
  text-align: right;
}

#viewer .sv-asm__x {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-color: transparent;
  background: none;
}

#viewer .sv-asm__x:hover {
  background: var(--sv-hover);
}

/* The hint line: what to click next, centred under the stage's top pills. */
.sv-asm-hint {
  position: absolute;
  z-index: 3;
  top: 100px;
  left: calc(var(--sv-l, 0px) + (100% - var(--sv-l, 0px) - var(--sv-r, 0px)) / 2);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - var(--sv-l, 0px) - var(--sv-r, 0px) - 32px);
  padding: 4px 6px 4px 14px;
  border: 1px solid var(--sv-border);
  border-radius: 18px;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--sv-surface);
  box-shadow: var(--sv-shadow);
  font-size: 13px;
  transform: translateX(-50%);
}

.sv-asm-hint[hidden] {
  display: none;
}

.sv-asm-hint__tools {
  display: flex;
  gap: 4px;
}

.sv-asm-hint__tools:empty {
  display: none;
}

#viewer .sv-asm-hint__tools button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
}

.sv-asm__unit {
  color: var(--sv-muted);
  font-size: 12px;
}

.sv-viewport.is-asm-pick video {
  cursor: crosshair;
}

@media (pointer: coarse) {
  .sv-asm__row,
  #viewer .sv-asm__x,
  #viewer .sv-asm-hint button {
    min-height: 44px;
  }

  #viewer .sv-asm__x {
    width: 44px;
  }

  #viewer .sv-asm__name,
  #viewer .sv-asm__mm {
    height: 40px;
  }
}
