/* Simulation overlay — toast and genset-card event flash. */

#sim-toast-host {
  position: fixed;
  right: 20px;
  bottom: 48px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}

.sim-toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 380px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--warn);
  border-radius: 4px;
  padding: 10px 10px 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(245, 165, 36, 0.15);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  font-family: var(--sans);
}
.sim-toast.in  { opacity: 1; transform: translateX(0); }
.sim-toast.out { opacity: 0; transform: translateX(16px); }

.sim-toast-ico {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--warn-bg);
  color: var(--warn);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(245, 165, 36, 0.35);
  animation: simPulse 1.4s ease-in-out infinite;
}
@keyframes simPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 165, 36, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 165, 36, 0); }
}

.sim-toast-body { flex: 1; min-width: 0; }
.sim-toast-title {
  font-size: 12.5px;
  color: var(--text-0);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}
.sim-toast-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.sim-toast-tag {
  color: var(--warn);
  font-weight: 600;
}
.sim-toast-detail { color: var(--text-2); }

.sim-toast-ack {
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  color: var(--text-0);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 2px;
  cursor: pointer;
  align-self: center;
}
.sim-toast-ack:hover {
  background: var(--warn);
  color: #1A0E05;
  border-color: var(--warn);
}

/* Card-level flash when a simulated event targets a genset card. */
.gcard.sim-event-warn {
  animation: simCardPulse 1.8s ease-in-out infinite;
}
.gcard.sim-event-warn::before {
  background: var(--warn) !important;
  box-shadow: 0 0 10px var(--warn) !important;
}
.gcard.sim-event-warn .state-label {
  color: var(--warn) !important;
  background: var(--warn-bg) !important;
}
.gcard.sim-event-warn .sdot {
  background: var(--warn) !important;
}
.gcard.sim-event-warn .sdot::after {
  border-color: var(--warn) !important;
}
@keyframes simCardPulse {
  0%, 100% { border-color: var(--line-strong); }
  50%      { border-color: rgba(245, 165, 36, 0.55); }
}

/* The state-label text is already rewritten to WARN and restyled by the rules
   above, so no extra badge is needed — adding one here overlaps the label and
   produces unreadable glyphs. */
