/* Bottom-right viewport key for debug overlays */

.overlay-legend {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  min-width: 148px;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(16, 19, 26, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  user-select: none;
}

.overlay-legend__title {
  margin-bottom: 6px;
  color: rgba(235, 228, 210, 0.72);
  font: 600 10px/1.2 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overlay-legend__list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.overlay-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-legend__label {
  color: rgba(232, 234, 237, 0.9);
  font: 500 11px/1.25 system-ui, sans-serif;
}

.overlay-legend__swatch {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  position: relative;
}

.overlay-legend__swatch--cross::before,
.overlay-legend__swatch--cross::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--legend-color);
  transform: translate(-50%, -50%);
  border-radius: 1px;
}

.overlay-legend__swatch--cross::before {
  width: 12px;
  height: 2px;
}

.overlay-legend__swatch--cross::after {
  width: 2px;
  height: 12px;
}

.overlay-legend__swatch--line::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  width: 12px;
  height: 2px;
  background: var(--legend-color);
  transform: translateY(-50%);
  border-radius: 1px;
}

.overlay-legend__swatch--capsule {
  border: 2px solid var(--legend-color);
  border-radius: 8px 8px 4px 4px;
  box-sizing: border-box;
  background: rgba(80, 220, 255, 0.08);
}

.overlay-legend__swatch--ellipse {
  border: 1.5px dashed var(--legend-color);
  border-radius: 50%;
  box-sizing: border-box;
}

.overlay-legend__swatch--wedge {
  overflow: hidden;
}

.overlay-legend__swatch--wedge::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 12px solid var(--legend-color);
  opacity: 0.9;
}

.overlay-legend__swatch--rect {
  border: 2px solid var(--legend-color);
  border-radius: 2px;
  box-sizing: border-box;
}

.overlay-legend__swatch--dot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--legend-color);
  transform: translate(-50%, -50%);
}

.overlay-legend__swatch--handle {
  border: 2px solid var(--legend-color);
  border-radius: 50%;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--legend-color) 22%, transparent);
}

.overlay-legend__swatch--handle::before,
.overlay-legend__swatch--handle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--legend-color);
  transform: translate(-50%, -50%);
  border-radius: 1px;
}

.overlay-legend__swatch--handle::before {
  width: 10px;
  height: 1.5px;
}

.overlay-legend__swatch--handle::after {
  width: 1.5px;
  height: 10px;
}
