/* Minecraft version bar (static/js/version_bar.js): post page and upload page.
        ----|=========|-----
          1.16      1.21          */


#post_versions.has-vbar { display: block; }

.vbar {
  display: block;
  position: relative;
  padding: 6px 0 0;
}

.vbar_track {
  display: block;
  position: relative;
  height: 6px;
  margin: 0 4px;
  border-radius: 3px;
  background: var(--bg-overlay);
}

.vbar_tick {
  position: absolute;
  top: 1px;
  width: 1px;
  height: 4px;
  background: var(--border-focus);
  transform: translateX(-50%);
}

.vbar_seg {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.vbar_seg.is-single { width: 0 !important; }

.vbar_dot {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-surface);
  transform: translate(-50%, -50%);
  transition: transform var(--transition), box-shadow var(--transition);
}

.vbar_dot:hover,
.vbar_dot:focus-visible {
  transform: translate(-50%, -50%) scale(1.35);
  box-shadow: 0 0 0 4px var(--accent-glow);
  outline: none;
}

.vbar_labels {
  display: block;
  position: relative;
  height: 20px;
  margin: 6px 4px 0;
}

.vbar_label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
  text-decoration: none;
}

.vbar_label.is-start { transform: none; }
.vbar_label.is-end { transform: translateX(-100%); }

.vbar_label.is-range { color: var(--accent); font-weight: 500; }
.vbar_label.is-range:hover { text-decoration: underline; }
.vbar_label.is-axis { color: var(--text-muted); }


.vbar .visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* ── Range picker (upload page) ─────────────────────────────── */

.vrange {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vrange_selects {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.vrange_field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.vrange_field select {
  min-width: 130px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
}

.vrange_field select:focus { outline: none; border-color: var(--accent); }

.vrange_arrow {
  padding-bottom: 9px;
  color: var(--text-muted);
}

.vrange_latest {
  height: 38px;
  padding: 0 14px;
  border: 1px dashed var(--border-focus);
  border-radius: var(--radius-md);
  background: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
}

.vrange_latest:hover { border-color: var(--accent); color: var(--accent); }

.vrange_bar {
  padding: 4px 6px 0;
  cursor: pointer;
  touch-action: none;           /* horizontal drags move the ends, not the page */
  user-select: none;
}

.vrange_bar .vbar_track { height: 8px; }

.vrange_bar.is-empty .vbar_track {
  background: repeating-linear-gradient(90deg, var(--bg-overlay) 0 8px, transparent 8px 12px);
}

.vbar_handle {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  transform: translate(-50%, -50%);
  cursor: grab;
}

.vrange_bar .vbar_dot { pointer-events: none; }

.vrange_error {
  margin: 0;
  color: var(--danger);
  font-size: 0.88rem;
}
