/*
 * Cadence — Digital Sheet Music Management Platform
 * Copyright © DoubTech. The LICENSE file in the repo root governs use of this file.
 *
 * audio-marker-overlay.css — Styles for MP3 marker overlays placed directly on
 * the sheet music by audio-marker-overlay.js: point pins ("(42)" measure,
 * "[B]" rehearsal letter, pin bookmark) and resizable dotted-rectangle
 * tappable regions. Scoped under .audio-marker-* so there is no bleed into
 * other annotation styles. A pending (not-yet-timed) marker renders hollow/
 * dashed; the marker currently at or just passed during playback pulses via
 * .is-active.
 */

.audio-marker-placed {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 9;
  pointer-events: auto;
  --audio-marker-color: #F4B942;
}

.audio-marker-placed.is-point {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  min-height: 1.6rem;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--audio-marker-color);
  border: 2px solid #05080A;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.audio-marker-placed.is-point.is-pending {
  background: transparent;
  border-style: dashed;
  border-color: var(--audio-marker-color);
}

.audio-marker-placed.is-region {
  border: 2px dashed var(--audio-marker-color);
  border-radius: 4px;
  background: color-mix(in srgb, var(--audio-marker-color) 18%, transparent);
  min-width: 1.5rem;
  min-height: 1.5rem;
}
.audio-marker-placed.is-region .audio-marker-badge {
  position: absolute;
  top: 2px;
  left: 4px;
}

.audio-marker-placed.is-editable {
  cursor: move;
  touch-action: none;
}

.audio-marker-badge {
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  color: #05080A;
  white-space: nowrap;
}
.audio-marker-placed.is-point.is-pending .audio-marker-badge { color: var(--audio-marker-color); }

.audio-marker-placed.is-active {
  animation: audio-marker-pulse 1s ease-in-out infinite;
}
@keyframes audio-marker-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--audio-marker-color) 70%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--audio-marker-color) 0%, transparent); }
}

.audio-marker-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  line-height: 16px;
  border-radius: 50%;
  border: none;
  background: #05080A;
  color: #fff;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  display: none;
}
.audio-marker-placed.is-editable:hover .audio-marker-remove { display: block; }

.audio-marker-resize-handle {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--audio-marker-color);
  border: 1px solid #05080A;
  cursor: nwse-resize;
  touch-action: none;
}

.audio-marker-new-input {
  border: 1px solid var(--audio-marker-color);
  border-radius: var(--radius-sm, 4px);
  background: var(--c-surface, #14202a);
  color: var(--c-text-primary, #fff);
  font-size: 12px;
  padding: 3px 6px;
  width: 8rem;
}
