/* Sable hero: the 3D equipment tour. Pairs with sable-hero.js. */

.sh-stage {
  --sh-bg: #f4f5f6;
  --sh-ink: #333333;
  --sh-ink-soft: #6b7177;
  --sh-line: #333333;
  --sh-accent: #1e88e5;
  --sh-ok: #2e9d5b;
  position: relative;
  overflow: hidden;
  background: var(--sh-bg);
}
.sh-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sh-overlay { position: absolute; inset: 0; pointer-events: none; font-family: Poppins, Arial, Helvetica, sans-serif; }
.sh-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* Leaders draw from the anchor to the card */
.sh-leader {
  fill: none;
  stroke: var(--sh-line);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 420ms cubic-bezier(.2,.7,.2,1);
}
.sh-leader.is-in { stroke-dashoffset: 0; }
.sh-anchor {
  fill: #fff;
  stroke: var(--sh-accent);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(.2);
  transition: opacity 200ms ease, transform 320ms cubic-bezier(.3,1.6,.5,1);
}
.sh-anchor.is-in { opacity: 1; transform: scale(1); }

/* Cards */
.sh-card {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 128px;
  padding: 9px 12px 10px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--sh-line);
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(20, 22, 23, .08);
  color: var(--sh-ink);
  opacity: 0;
  will-change: transform, opacity;
}
.sh-card > * { transition: opacity 260ms ease 160ms, translate 320ms cubic-bezier(.2,.7,.2,1) 160ms; }
.sh-card.is-in { opacity: 1; transition: opacity 200ms ease 140ms; }
.sh-card:not(.is-in) > * { opacity: 0; translate: 0 6px; }
.sh-card.is-out { opacity: 0; transition: opacity 260ms ease; }
.sh-card__title {
  font-family: Gotham, Poppins, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sh-ink-soft);
  margin-bottom: 4px;
}
.sh-card__row { display: flex; align-items: baseline; gap: 6px; line-height: 21px; white-space: nowrap; }
.sh-card__label { font-size: 12px; color: var(--sh-ink-soft); margin-right: auto; padding-right: 10px; }
.sh-card__value { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; color: #141617; }
.sh-card__unit { font-size: 11px; color: var(--sh-ink-soft); }
.sh-card__value[data-status]::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 1px;
  background: var(--sh-ok);
  box-shadow: 0 0 0 3px rgba(46, 157, 91, .15);
}
.sh-card__value[data-status="info"]::before { background: var(--sh-accent); box-shadow: 0 0 0 3px rgba(30, 136, 229, .15); }
.sh-card--fit { min-width: 0; }
.sh-card--fit .sh-card__title,
.sh-card--fit .sh-card__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-card--fit .sh-card__label { min-width: 0; }
.sh-card--fit .sh-card__value,
.sh-card--fit .sh-card__unit { flex: none; }

/* The stop name, above the model */
.sh-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--sh-ink-soft);
  opacity: 0;
  translate: 0 4px;
  transition: opacity 300ms ease, translate 300ms ease;
}
.sh-chip.is-in { opacity: 1; translate: 0 0; }
.sh-chip__count { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.sh-chip__name { font-family: Gotham, Poppins, sans-serif; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sh-ink); }
.sh-chip__live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sh-accent);
  box-shadow: 0 0 0 0 rgba(30, 136, 229, .5);
  animation: sh-live 1.8s ease-out infinite;
}
@keyframes sh-live { to { box-shadow: 0 0 0 9px rgba(30, 136, 229, 0); } }

/* Stop dots, below the model */
.sh-dots { position: absolute; display: flex; gap: 8px; pointer-events: auto; }
.sh-dot-btn {
  width: 22px; height: 4px; padding: 0; border: 0; border-radius: 2px;
  background: #cfd4d8; cursor: pointer;
  transition: background 200ms ease, width 300ms ease;
}
.sh-dot-btn.is-current { width: 40px; background: var(--sh-ink); }
.sh-dot-btn:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .sh-leader, .sh-anchor, .sh-card, .sh-card > *, .sh-chip { transition: none; }
  .sh-chip__live { animation: none; }
}
@media (max-width: 520px) {
  .sh-card { min-width: 0; padding: 6px 9px 7px; }
  .sh-card__title { letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sh-card__row { line-height: 18px; min-width: 0; }
  .sh-card__value { font-size: 13px; flex: none; }
  .sh-card__label { font-size: 11px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sh-card__unit { flex: none; }
}

/* Alert status dot (a detection) */
.sh-card__value[data-status="alert"]::before { background: #e5533d; box-shadow: 0 0 0 3px rgba(229, 83, 61, .18); }

/* The AI camera's detection box and its tag */
.sh-detect {
  fill: rgba(30, 136, 229, .06);
  stroke: var(--sh-accent);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  opacity: 0;
  transition: opacity 300ms ease 300ms;
}
.sh-detect.is-in { opacity: 1; animation: sh-dash 1s linear infinite; }
@keyframes sh-dash { to { stroke-dashoffset: -10; } }
.sh-detect-tag {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--sh-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 300ms ease 300ms;
}
.sh-detect-tag b { font-weight: 600; opacity: .85; }
.sh-detect-tag.is-in { opacity: 1; }
.sh-detect-tag__dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: sh-blink 1.2s steps(2, start) infinite; }
@keyframes sh-blink { to { visibility: hidden; } }
