/* Shared styles for NumberLine, used by Number Line Ninja, Round It Up,
   Regroup Rescue, and Compare It! */

.nl-wrap {
  width: 100%;
  padding: 46px 12px 34px;
}

.nl-track {
  position: relative;
  width: 100%;
  height: 4px;
  margin: 0 auto;
}

.nl-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
}

.nl-tick {
  position: absolute;
  top: -6px;
  width: 2px;
  height: 16px;
  background: var(--color-border);
  transform: translateX(-1px);
}

.nl-tick--major {
  height: 22px;
  top: -9px;
  background: var(--color-text-soft);
}

.nl-tick-label {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: var(--color-text-soft);
  white-space: nowrap;
}

.nl-zone {
  position: absolute;
  top: -10px;
  height: 24px;
  border-radius: 6px;
  background: rgba(79, 216, 224, 0.16);
  border: 1px solid rgba(79, 216, 224, 0.35);
}

.nl-zone--good { background: rgba(74, 222, 128, 0.18); border-color: rgba(74, 222, 128, 0.4); }
.nl-zone--warn { background: rgba(238, 111, 168, 0.16); border-color: rgba(238, 111, 168, 0.4); }

.nl-zone-label {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  color: var(--color-text-soft);
  white-space: nowrap;
}

.nl-marker {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}

.nl-marker-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.nl-marker-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

.nl-marker--start .nl-marker-dot { background: var(--color-text-soft); box-shadow: 0 0 0 2px var(--color-text-soft); }
.nl-marker--target .nl-marker-dot { background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent); }
.nl-marker--a .nl-marker-dot { background: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary); }
.nl-marker--b .nl-marker-dot { background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent); }

.nl-marker--live {
  cursor: grab;
  z-index: 2;
}

.nl-marker--live .nl-marker-dot {
  width: 20px;
  height: 20px;
  background: var(--color-success);
  box-shadow: 0 0 0 3px var(--color-success);
}

.nl-marker--live .nl-marker-label {
  background: var(--color-success);
  color: var(--color-on-accent);
  border-color: var(--color-success);
}

.nl-marker--live:focus-visible .nl-marker-dot {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.nl-track {
  cursor: pointer;
}
