/* EV RACE — component: occupancy dots / rows (.occ-*, .gun-dot--live).
   Канон: CSS/components/occupancy-dots.css. Страницы: /stations, /map.
   Type dim; status + dot carry bucket color. */

@keyframes gun-dot-charge-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 5px color-mix(in srgb, var(--live-charging) 55%, transparent);
  }
  50% {
    opacity: 0.25;
    transform: scale(0.85);
    box-shadow: 0 0 12px var(--live-charging);
  }
}

.occ-bundle {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  color: inherit;
}

.occ-bundle--stale {
  opacity: 0.55;
  filter: saturate(0.75);
}

.occ-rows {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}

.occ-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.25;
}

/* Type = label (dim); status = signal */
.occ-type {
  flex: 0 0 auto;
  color: var(--fg-3);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.occ-status {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.occ-row--accent-available .occ-status {
  color: var(--live-free);
}

.occ-row--accent-charging .occ-status {
  color: var(--live-charging);
}

.occ-row--accent-busy .occ-status {
  color: var(--live-busy);
}

.occ-row--accent-unavailable .occ-status,
.occ-row--nodata .occ-status {
  color: var(--live-idle);
}

.occ-row--nodata .occ-type {
  color: var(--fg-3);
}

.occ-row .gun-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  background: var(--live-free);
  box-sizing: border-box;
}

.occ-row .gun-dot--live.gun-dot--available {
  background: var(--live-free);
  box-shadow: 0 0 6px color-mix(in srgb, var(--live-free) 45%, transparent);
}

.occ-row .gun-dot--live.gun-dot--charging {
  background: var(--live-charging) !important;
  box-shadow: 0 0 6px color-mix(in srgb, var(--live-charging) 55%, transparent);
  animation: gun-dot-charge-pulse 1.15s ease-in-out infinite !important;
  animation-play-state: running !important;
}

.occ-row .gun-dot--live.gun-dot--busy {
  background: var(--live-busy) !important;
  box-shadow: 0 0 6px color-mix(in srgb, var(--live-busy) 45%, transparent);
  animation: none !important;
}

.occ-row .gun-dot--live.gun-dot--unavailable,
.occ-row .gun-dot--live.gun-dot--offline,
.occ-row .gun-dot--live.gun-dot--unknown,
.occ-row .gun-dot--live.gun-dot--nodata {
  background: var(--live-idle) !important;
  box-shadow: none;
  opacity: 0.7;
  animation: none !important;
}

.occ-suffix {
  font-family: var(--font);
  font-size: 11px;
  color: var(--fg-3);
  white-space: nowrap;
}

.occ-suffix--stale {
  opacity: 0.8;
}

.occ-summary-label {
  display: block;
  font-family: var(--font);
  font-size: 11px;
  color: var(--fg-3);
  margin-bottom: 4px;
}

.occ-summary-suffix {
  display: block;
  margin-top: 4px;
  font-family: var(--font);
  font-size: 11px;
  color: var(--fg-3);
}

.gun-pill--catalog {
  opacity: 0.92;
  gap: 0;
}
.gun-pill--catalog .gun-dot {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .occ-row .gun-dot--live.gun-dot--charging,
  .gun-dot--live.gun-dot--charging,
  body.location-page .gun-dot--live.gun-dot--charging {
    animation: none !important;
  }
}

@media (max-width: 400px) {
  .occ-row {
    font-size: 10px;
  }
  .occ-row .gun-dot {
    width: 7px;
    height: 7px;
  }
}

/* Kill inherited green from parent live badge / op color */
.st-live-ok .occ-type,
.st-live-busy .occ-type,
.loc-head-top .occ-type {
  color: var(--fg-3);
}
