/* odometer.css — mechanical odometer look for odometer.js */

.odometer {
  --cell: 1.45em;               /* height of one digit window */
  --drum: #141414;              /* wheel color */
  --paint: #e9e2cf;             /* digit paint, slightly yellowed */
  --last-drum: #e9e2cf;         /* the odd-colored rightmost wheel */
  --last-paint: #1a1a1a;

  display: inline-flex;
  gap: 2px;                     /* the dark slots between wheels */
  padding: 4px 5px;
  background: #000;
  border-radius: 3px;
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.9),
    0 0 0 1px #6d6d6d,          /* thin bright trim ring */
    0 0 0 3px #262626;          /* dash plastic around it */
  font: 700 22px/1 "Arial Narrow", "Helvetica Neue Condensed", "Roboto Condensed",
        "Liberation Sans Narrow", Arial, sans-serif;
  vertical-align: middle;
}

/* Hidden until the count arrives, and stays hidden if the fetch fails */
.odometer:empty {
  display: none;
}

.odometer__wheel {
  position: relative;
  display: block;
  width: 0.8em;
  height: var(--cell);
  overflow: hidden;
  background: var(--drum);
}

/* Cylinder shading: the wheel curves away from you top and bottom */
.odometer__wheel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0) 28%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(0, 0, 0, 0) 72%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.odometer__strip {
  display: block;
  transform: translateY(calc((var(--d, 0) + var(--jitter, 0)) * -1 * var(--cell)));
  transition: transform 1.1s cubic-bezier(0.35, 0.05, 0.3, 1);
}

.odometer__strip > span {
  display: block;
  height: var(--cell);
  line-height: var(--cell);
  text-align: center;
  color: var(--paint);
  font-variant-numeric: tabular-nums;
}

.odometer__wheel--last {
  background: var(--last-drum);
}

.odometer__wheel--last .odometer__strip > span {
  color: var(--last-paint);
}

@media (prefers-reduced-motion: reduce) {
  .odometer__strip {
    transition: none;
  }
}
