/* rail.css — shared styles for the DD line-minimap rail (rail.js).
   Extracted from gallery.css in P2.4 so paper pages can carry the
   rail too. Tick metrics are the shipped devouringdetails.com ones —
   see rail.js for the port notes. */

.rail {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
}

.rail-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 32px;
}

.rail-tick {
  width: 24px;
  height: 1px;
  padding: 0;
  border: 0;
  background: var(--colors-gray9);
  transform-origin: 0 0;
  display: block;
}
.rail-tick[data-major="true"] {
  width: 40px;
  background: var(--colors-gray12);
}
button.rail-tick {
  cursor: pointer;
  position: relative;
}
/* a larger invisible hit area for the 1px buttons */
button.rail-tick::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}
button.rail-tick:focus-visible {
  outline: 2px solid var(--colors-focus);
  outline-offset: 3px;
}

.rail-indicator {
  position: absolute;
  left: 32px;
  top: 0;
  height: 1px;
  background: var(--orange);
  pointer-events: none;
  display: flex;
}
.rail-indicator[data-full="true"] {
  width: 100vw;
  left: 32px;
}
.rail-indicator svg {
  transform: translate(-16px, -3px) rotate(-90deg);
}
.rail-indicator svg path {
  fill: var(--orange);
}

.rail-label {
  position: absolute;
  left: 84px;
  top: 0;
  font-family: var(--fonts-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--colors-gray11);
  background: var(--card-bg);
  border: 1px solid var(--colors-gray5);
  border-radius: 6px;
  padding: 3px 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.rail-label[data-show="true"] {
  opacity: 1;
}

/* the rail needs breathing room — hide on narrow viewports */
@media (max-width: 1180px) {
  .rail {
    display: none;
  }
}
