/* weaver.css — minimal custom styles layered on top of Tailwind CDN.
   Mostly status-badge colors and a couple of small affordances that are
   awkward to express purely as utility classes. */

:root {
  --w-bg: #f8fafc;
}

body {
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------------------
   Status badges
   --------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 9999px;
  white-space: nowrap;
}
.badge--sm {
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge--lg {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: currentColor;
}

.badge-pending {
  background: #f1f5f9;
  color: #475569;
}
.badge-completed {
  background: #dcfce7;
  color: #15803d;
}
.badge-failed {
  background: #fee2e2;
  color: #b91c1c;
}
.badge-cancelled {
  background: #f1f5f9;
  color: #64748b;
}
.badge-running {
  background: #dbeafe;
  color: #1d4ed8;
}
/* Pulse on the running dot */
.badge-running .badge-dot {
  animation: w-pulse 1.2s ease-in-out infinite;
}
@keyframes w-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

/* ---------------------------------------------------------------------------
   Misc
   --------------------------------------------------------------------------- */
.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* HTMX request indicator helper */
.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms ease-in;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Output pre block */
.output-pre {
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

/* Card hover lift */
.wf-card {
  transition: box-shadow 150ms ease, transform 150ms ease, border-color 150ms ease;
}
.wf-card:hover {
  transform: translateY(-2px);
}
