/*
 * Swarm Constitution editor surface styles (#8334).
 * Scoped to the `.ww-sce*` namespace emitted by swarm-constitution-editor.js.
 * Mirrors the panel/pill conventions used by swarm-forensics-view.js.
 */
.ww-sce {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}
.ww-sce-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.ww-sce-head h2 {
  margin: 0;
}
.ww-sce-muted {
  color: var(--ww-text-muted, #6b7280);
  font-size: 0.875rem;
}
.ww-sce-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.ww-sce-pill {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  background: var(--ww-surface-muted, #eef2ff);
  color: var(--ww-text, #111827);
  border: 1px solid transparent;
}
.ww-sce-pill--active {
  background: var(--ww-success-soft, #dcfce7);
  color: var(--ww-success, #166534);
}
.ww-sce-pill--ok {
  background: var(--ww-success-soft, #dcfce7);
  color: var(--ww-success, #166534);
}
.ww-sce-pill--danger {
  background: var(--ww-danger-soft, #fee2e2);
  color: var(--ww-danger, #991b1b);
}
.ww-sce-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ww-sce-row {
  border: 1px solid var(--ww-border, #e5e7eb);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}
.ww-sce-row[data-quarantined="true"] {
  border-color: var(--ww-danger, #991b1b);
  background: var(--ww-danger-soft, #fef2f2);
}
.ww-sce-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.ww-sce-row-name {
  font-weight: 600;
}
.ww-sce-row-meta,
.ww-sce-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
}
.ww-sce-row-meta dt,
.ww-sce-facts dt {
  color: var(--ww-text-muted, #6b7280);
  font-size: 0.75rem;
}
.ww-sce-row-meta dd,
.ww-sce-facts dd {
  margin: 0;
  font-size: 0.875rem;
}
.ww-sce-detail {
  border: 1px solid var(--ww-border, #e5e7eb);
  border-radius: 0.5rem;
  padding: 1rem;
}
.ww-sce-projection h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}
.ww-sce-link {
  color: var(--ww-link, #4338ca);
  text-decoration: underline;
}
.ww-sce-confirm {
  border: 1px solid var(--ww-border, #e5e7eb);
  border-radius: 0.5rem;
  padding: 1rem;
}
.ww-sce-field {
  display: block;
  margin: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--ww-text-muted, #6b7280);
}
.ww-sce-field textarea {
  display: block;
  width: 100%;
  min-height: 4rem;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid var(--ww-border, #e5e7eb);
  border-radius: 0.375rem;
  font: inherit;
}
.ww-sce-warning {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: var(--ww-danger-soft, #fee2e2);
  color: var(--ww-danger, #991b1b);
  font-size: 0.875rem;
}
.ww-sce-actions {
  display: flex;
  gap: 0.5rem;
}
.ww-sce-submit {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid var(--ww-border, #e5e7eb);
  background: var(--ww-primary, #4338ca);
  color: #fff;
  cursor: pointer;
}
.ww-sce-submit[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.ww-sce--empty,
.ww-sce--loading,
.ww-sce--error {
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px dashed var(--ww-border, #e5e7eb);
  color: var(--ww-text-muted, #6b7280);
}
.ww-sce--error {
  border-color: var(--ww-danger, #991b1b);
  color: var(--ww-danger, #991b1b);
}
