/* Sticky Note */
.el-sticky {
  position: absolute;
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 2px 3px 0 rgba(0,0,0,.12);
  min-width: 80px;
  min-height: 40px;
  cursor: default;
  word-break: break-word;
  white-space: pre-wrap;
  z-index: 10;
  transition: box-shadow .12s;
}
.el-sticky.selected {
  box-shadow: 0 0 0 2px #4a90d9, 2px 3px 0 rgba(0,0,0,.12);
  z-index: 20;
}
.el-sticky .resize-handle {
  position: absolute;
  right: -4px; bottom: -4px;
  width: 10px; height: 10px;
  cursor: nwse-resize;
  border-radius: 2px;
  background: #4a90d9;
  opacity: 0;
  transition: opacity .1s;
}
.el-sticky.selected .resize-handle { opacity: 1; }

.el-sticky .el-text {
  outline: none;
  min-height: 1em;
}

/* Anchor points for connectors */
.anchor {
  position: absolute;
  width: 10px; height: 10px;
  background: #4a90d9;
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 30;
  cursor: crosshair;
  opacity: 0;
  transition: opacity .1s;
  pointer-events: all;
}
.el-sticky:hover .anchor,
.el-sticky.selected .anchor { opacity: 1; }
.anchor.top    { top: -5px;    left: 50%; transform: translateX(-50%); }
.anchor.bottom { bottom: -5px; left: 50%; transform: translateX(-50%); }
.anchor.left   { left: -5px;   top: 50%;  transform: translateY(-50%); }
.anchor.right  { right: -5px;  top: 50%;  transform: translateY(-50%); }

/* Frame */
.el-frame {
  position: absolute;
  border-radius: 18px;
  border: 2px dashed;
  pointer-events: none;
  z-index: 3;
}
.el-frame.selected {
  pointer-events: auto;
  box-shadow: 0 0 0 2px rgba(74,144,217,.4);
}
.el-frame .frame-label {
  position: absolute;
  top: -24px; left: 10px;
  background: #1a1a18;
  color: #fff;
  border-radius: 6px;
  padding: 3px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: auto;
  cursor: text;
  outline: none;
}
.el-frame .frame-resize {
  position: absolute;
  right: -5px; bottom: -5px;
  width: 12px; height: 12px;
  cursor: nwse-resize;
  background: #4a90d9;
  border-radius: 3px;
  opacity: 0;
  pointer-events: auto;
  transition: opacity .1s;
}
.el-frame.selected .frame-resize { opacity: 1; }

/* Label (free text) */
.el-label {
  position: absolute;
  font-size: 14px;
  line-height: 1.4;
  color: #1a1a18;
  cursor: default;
  outline: none;
  min-width: 20px;
  min-height: 1em;
  z-index: 10;
  padding: 2px 4px;
  border-radius: 3px;
}
.el-label.selected {
  box-shadow: 0 0 0 2px #4a90d9;
}

/* Shape */
.el-shape {
  position: absolute;
  cursor: default;
  z-index: 10;
}
.el-shape.selected {
  filter: drop-shadow(0 0 0 2px #4a90d9);
  z-index: 20;
}
.el-shape.selected::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 2px solid #4a90d9;
  border-radius: 4px;
  pointer-events: none;
}
.el-shape svg {
  display: block;
  pointer-events: none;
}
.shape-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  line-height: 1.4;
  word-break: break-word;
  color: #1a1a18;
  outline: none;
  pointer-events: auto;
}
.el-shape .resize-handle {
  position: absolute;
  right: -4px; bottom: -4px;
  width: 10px; height: 10px;
  cursor: nwse-resize;
  border-radius: 2px;
  background: #4a90d9;
  opacity: 0;
  transition: opacity .1s;
}
.el-shape.selected .resize-handle { opacity: 1; }
.el-shape .anchor {
  opacity: 0;
}
.el-shape:hover .anchor,
.el-shape.selected .anchor { opacity: 1; }

/* Draw element */
.el-draw {
  position: absolute;
  cursor: default;
  z-index: 9;
}
.el-draw.selected::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 2px solid #4a90d9;
  border-radius: 4px;
  pointer-events: none;
}
.el-draw svg { display: block; pointer-events: none; }
.draw-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Connector line */
.connector-path {
  fill: none;
  stroke-linecap: round;
  cursor: pointer;
  pointer-events: stroke;
  stroke-width: 2;
}
.connector-path.selected {
  filter: drop-shadow(0 0 3px rgba(74,144,217,.5));
}
.connector-path-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 12;
  cursor: pointer;
  pointer-events: stroke;
}

/* Temp connector while drawing */
.connector-temp {
  fill: none;
  stroke: #4a90d9;
  stroke-width: 2;
  stroke-dasharray: 6 4;
  pointer-events: none;
}
