.AreaHighlight {
  position: absolute;
}

.AreaHighlight__part {
  cursor: pointer;
  position: absolute;
  background: rgba(255, 226, 143, 1);
  transition: background 0.3s, box-shadow 0.2s ease;
}

.AreaHighlight--scrolledTo .AreaHighlight__part {
  box-shadow:
    0 0 0 2px #ff4141,
    0 0 0 4px rgba(255, 65, 65, 0.2);
}

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

/* Toolbar - appears on hover */
.AreaHighlight__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;
}

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

.AreaHighlight__style-button,
.AreaHighlight__copy-button,
.AreaHighlight__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;
}

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

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

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

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

.AreaHighlight__style-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

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

.AreaHighlight__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;
}

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

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

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

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

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