/* targets.css — Target popover modal, indicators canvas, separators, labels */

#target-popover {
  position: fixed;
  background: var(--surface-glass-thin);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  white-space: nowrap;
  animation: popoverIn 0.15s ease both;
}

#target-popover.hidden {
  display: none !important;
}

@keyframes popoverIn {
  from { opacity: 0; transform: translateY(4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#target-popover-header {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

#target-count-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.btn-target-adjust {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(36, 40, 54, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-target-adjust:hover {
  background: rgba(46, 51, 69, 0.8);
  border-color: var(--text-muted);
}

#target-count-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  color: var(--accent);
}

#target-count-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

#target-popover-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

#target-popover-actions .btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

/* Target Indicator Strip */

#target-indicators {
  position: relative;
  height: 32px;
  margin-top: -1rem;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: none;
  order: 3;
}

#target-indicators.visible {
  animation: target-strip-reveal 0.35s ease both;
}

@keyframes target-strip-reveal {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0 0); }
}

#target-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#target-labels {
  position: relative;
  height: 20px;
  margin-top: -1rem;
  order: 4;
  overflow: hidden;
}

.target-label {
  position: absolute;
  transform: translateX(-50%);
  padding: 1px 3px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  color: #000;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  top: 5px;
}

/* Shot Target Badge */

.shot-target-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #000;
  line-height: 1.3;
}

/* Target Separator Handles */

#target-separators {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.target-separator {
  position: absolute;
  top: 0;
  height: 100%;
  width: 20px;
  transform: translateX(-50%);
  cursor: col-resize;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.target-separator-line {
  width: 2px;
  height: 100%;
  background: var(--text-muted);
  border-radius: 1px;
  pointer-events: none;
  position: absolute;
}

.target-separator-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 3px;
  font-size: 0.6rem;
  color: var(--text);
  position: relative;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.target-separator.locked {
  cursor: default;
  pointer-events: none;
}

.target-separator:not(.locked):hover .target-separator-line {
  background: var(--accent);
}

.target-separator:not(.locked):hover .target-separator-icon {
  border-color: var(--accent);
  color: var(--accent);
}

.target-separator.dragging .target-separator-line {
  background: var(--accent);
}

.target-separator.dragging .target-separator-icon {
  border-color: var(--accent);
  color: var(--accent);
}

/* Separator Switch Button (rendered in #target-labels) */

.separator-switch-btn {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.6rem;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}
.separator-switch-btn.visible { opacity: 1; pointer-events: auto; }
.separator-switch-btn:hover { border-color: var(--accent); color: var(--accent); }
.separator-switch-btn svg { width: 15px; height: 18px; }

/* Shot Log Transition Rows */

.shot-transition-row { pointer-events: none; }
.shot-transition-cell {
  text-align: center;
  padding: 6px 8px;
  font-size: 0.75rem;
  color: var(--text);
  background: rgba(46, 51, 69, 0.3);
  position: relative;
}
.shot-transition-cell .transition-icon { vertical-align: middle; margin-right: 4px; }
.shot-transition-cell .transition-icon svg { width: 12px; height: 16px; vertical-align: middle; }
.transition-play-btn {
  pointer-events: auto;
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
}

/* Target Metric Visibility */

.target-metric.visible {
  display: flex !important;
}
