.ShapeHighlight {
  position: absolute;
}

.ShapeHighlight__rnd {
  cursor: move;
}

.ShapeHighlight__container {
  width: 100%;
  height: 100%;
  position: relative;
}

.ShapeHighlight__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ShapeHighlight--scrolledTo .ShapeHighlight__svg rect,
.ShapeHighlight--scrolledTo .ShapeHighlight__svg ellipse,
.ShapeHighlight--scrolledTo .ShapeHighlight__svg line {
  stroke: #ff4141 !important;
}

.ShapeHighlight--scrolledTo .ShapeHighlight__svg polygon {
  fill: #ff4141 !important;
}

/* Toolbar wrapper - creates hover bridge between toolbar and shape */
.ShapeHighlight__toolbar-wrapper {
  z-index: 10;
}

/* Toolbar - appears on hover */
.ShapeHighlight__toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ShapeHighlight__toolbar--visible {
  opacity: 1;
  pointer-events: auto;
}

.ShapeHighlight__style-button,
.ShapeHighlight__delete-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: white;
  border-radius: 3px;
  padding: 0;
  transition: background 0.2s;
}

.ShapeHighlight__style-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ShapeHighlight__delete-button:hover {
  background: rgba(255, 100, 100, 0.6);
}

/* Style Panel */
.ShapeHighlight__style-panel {
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 6px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ShapeHighlight__style-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ShapeHighlight__style-row:last-child {
  margin-bottom: 0;
}

.ShapeHighlight__style-row label {
  color: #ccc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 8px;
}

/* Color options */
.ShapeHighlight__color-options {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ShapeHighlight__color-presets {
  display: flex;
  gap: 4px;
}

.ShapeHighlight__color-preset {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  padding: 0;
}

.ShapeHighlight__color-preset:hover {
  transform: scale(1.15);
}

.ShapeHighlight__color-preset.active {
  border-color: #b958ff;
}

.ShapeHighlight__color-options input[type="color"] {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
}

.ShapeHighlight__color-options input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.ShapeHighlight__color-options input[type="color"]::-webkit-color-swatch {
  border: 1px solid #666;
  border-radius: 4px;
}

/* Stroke width options */
.ShapeHighlight__width-options {
  display: flex;
  gap: 4px;
}

.ShapeHighlight__width-button {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid #666;
  border-radius: 4px;
  cursor: pointer;
  color: #ccc;
  font-size: 11px;
  transition: all 0.2s;
}

.ShapeHighlight__width-button:hover {
  border-color: #b958ff;
  color: white;
}

.ShapeHighlight__width-button.active {
  background: rgba(185, 88, 255, 0.2);
  border-color: #b958ff;
  color: #b958ff;
}
