/* Extends the existing field/grid2/btn workspace components. */
.dev-tool {
  min-width: 0;
}
.dev-tool .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}
.dev-tool textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  tab-size: 2;
  max-width: 100%;
  overflow: auto;
}
.dev-warning {
  white-space: pre-wrap;
  color: #9a3412;
  font-weight: 600;
}
.dev-warning:empty {
  display: none;
}
.dev-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1rem 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 1rem;
}
.dev-flags label,
.dev-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dev-tool input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: #5548de;
}
.dev-highlight {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  min-height: 4rem;
}
.dev-highlight mark {
  background: #fde68a;
  color: #111827;
  border-radius: 2px;
  outline: 1px solid #d97706;
}
.dev-match {
  padding: 0.6rem;
  border-bottom: 1px solid #e2e8f0;
  overflow-wrap: anywhere;
}
.dev-capture {
  display: block;
  background: #ede9fe;
  color: #312e81;
  padding: 0.25rem 0.5rem;
  margin: 0.25rem 0;
  border-left: 3px solid #7c3aed;
  font-family: ui-monospace, monospace;
}
.dev-layer {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin: 0.75rem 0;
  padding: 1rem;
}
.dev-tool input[type="range"] {
  padding: 0;
  min-height: 2rem;
  accent-color: #5548de;
  cursor: pointer;
}
.dev-tool input[type="color"] {
  width: 100%;
  height: 2.5rem;
  padding: 0.2rem;
}
.dev-tool output {
  float: right;
  font-variant-numeric: tabular-nums;
}
.dev-canvas {
  display: grid;
  place-items: center;
  min-height: 280px;
  border-radius: 18px;
  margin: 1rem 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, #fb7185 0, transparent 40%),
    radial-gradient(circle at 80% 70%, #38bdf8 0, transparent 45%),
    linear-gradient(135deg, #8b5cf6, #14b8a6);
}
.dev-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 70%;
  max-width: 360px;
  min-height: 150px;
  padding: 2rem;
  border-radius: 20px;
  color: #0f172a;
}
.dev-preview strong {
  font-size: 1.5rem;
}
.dev-tool button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.dev-tool :focus-visible {
  outline: 3px solid #5548de;
  outline-offset: 3px;
}
.dev-tool [hidden] {
  display: none !important;
}
#dev-matches {
  max-height: 26rem;
  overflow: auto;
}
@media (max-width: 600px) {
  .dev-tool .grid2 {
    grid-template-columns: 1fr;
  }
  .dev-preview {
    padding: 1rem;
    width: 75%;
  }
  .dev-tool .actions .btn {
    flex: 1 1 140px;
  }
}
.dev-inline-capture {
  border-bottom: 2px solid #7c3aed;
}
.dev-group-0 {
  background: #ddd6fe;
  color: #312e81;
}
.dev-group-1 {
  background: #a7f3d0;
  color: #064e3b;
}
.dev-group-2 {
  background: #bfdbfe;
  color: #1e3a8a;
}
