.live-log-dialog {
  width: min(1000px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: 92dvh;
  padding: 24px;
  overflow-y: auto;
}
.live-log-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.live-log-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-log-controls input[type='checkbox'] {
  width: auto;
}
.live-log-connected,
.live-log-warning {
  padding: 10px 14px;
  border-radius: 10px;
}
.live-log-connected {
  background: #163a2f;
  color: #a2efd0;
}
.live-log-warning {
  background: #473521;
  color: #ffe0a6;
}
#live-log-current {
  max-height: 32vh;
  overflow-y: auto;
  margin-bottom: 16px;
}
.live-log-action {
  padding: 12px;
  border: 1px solid #424649;
  border-radius: 10px;
  margin: 8px 0;
}
.live-log-action p {
  margin: 6px 0;
}
.live-log-action small {
  color: #becbd0;
}
.live-log-history {
  max-height: 34vh;
  min-height: 100px;
  overflow-y: auto;
  padding: 0;
  list-style: none;
}
.live-log-history li {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 4px 14px;
  padding: 12px 8px;
  border-bottom: 1px solid #424649;
}
.live-log-history time {
  grid-row: span 2;
  color: #becbd0;
  font-size: 0.85rem;
}
.live-log-history span {
  grid-column: 2;
}
.live-log-dialog p,
.live-log-history li {
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .live-log-dialog {
    padding: 16px;
  }
  .live-log-history li {
    grid-template-columns: 1fr;
  }
  .live-log-history time {
    grid-row: auto;
  }
  .live-log-history span {
    grid-column: 1;
  }
}

.lifecycle-object .monitor-status,
.monitor-node .monitor-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}

.workflow-hourglass {
  flex: 0 0 18px;
  overflow: visible;
  color: var(--accent);
  transform-origin: center;
  animation: workflow-hourglass-turn 2.8s ease-in-out infinite;
}

.workflow-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.workflow-status-success {
  color: #a2efd0;
}

.workflow-status-failure {
  color: #ffb4ad;
}

.workflow-status-unknown,
.monitor-unknown {
  color: #ffe0a6;
}

.monitor-node.monitor-unknown,
.lifecycle-object.monitor-unknown {
  border-color: #aa844e;
}

.workflow-status-waiting {
  color: #becbd0;
}

.workflow-hourglass-frame,
.workflow-hourglass-stream {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workflow-hourglass-sand-top,
.workflow-hourglass-sand-bottom {
  fill: currentColor;
  transform-box: fill-box;
  transform-origin: center bottom;
}

.workflow-hourglass-sand-top {
  animation: workflow-hourglass-empty 2.8s linear infinite;
}

.workflow-hourglass-sand-bottom {
  animation: workflow-hourglass-fill 2.8s linear infinite;
}

.workflow-hourglass-stream {
  stroke-dasharray: 1 3;
  animation: workflow-hourglass-flow 0.7s linear infinite;
}

@keyframes workflow-hourglass-turn {
  0%,
  78% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

@keyframes workflow-hourglass-empty {
  0% {
    transform: scaleY(1);
  }
  78%,
  100% {
    transform: scaleY(0.08);
  }
}

@keyframes workflow-hourglass-fill {
  0% {
    transform: scaleY(0.08);
  }
  78%,
  100% {
    transform: scaleY(1);
  }
}

@keyframes workflow-hourglass-flow {
  to {
    stroke-dashoffset: -4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-hourglass,
  .workflow-hourglass * {
    animation: none;
  }
}
