.overlay-custom-editor {
  grid-column: 1/-1;
  min-width: 0;
}
.custom-widget-settings{margin:18px 0;min-width:0}
[data-custom-fields]{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:12px}
.custom-field-group{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0;border:1px solid var(--ui-border);border-radius:8px;padding:12px;overflow-wrap:anywhere}
.custom-field-group legend{padding:0 6px;font-weight:600;max-width:100%;box-sizing:border-box}
.custom-field{display:grid;gap:6px;min-width:0}.custom-field input:not([type=checkbox]),.custom-field select,.custom-field textarea{width:100%;min-width:0;box-sizing:border-box}.custom-field.toggle-row{display:flex;justify-content:space-between}.custom-field output{font-variant-numeric:tabular-nums}
.custom-editor-actions,
.custom-code-tabs {
  flex-wrap: wrap;
  gap: 8px;
}
.custom-code-tabs {
  margin: 12px 0 8px;
}
.custom-code-tabs [aria-selected="false"] {
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
.custom-chat-code {
  font:
    13px/1.55 Consolas,
    monospace !important;
  width: 100%;
  min-height: 240px;
  max-height: 520px;
  resize: vertical;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}
.overlay-custom-editor [hidden] {
  display: none !important;
}
[data-custom-chat-editor][hidden],
[data-custom-chat-basic][hidden] {
  display: none !important;
}
[data-custom-chat-basic],
[data-custom-chat-mode] {
  grid-column: 1/-1;
  min-width: 0;
}
.custom-chat-reference { min-width: 0; margin-top: 20px; }
.custom-chat-reference td { vertical-align: top; }
.custom-chat-reference code { white-space: pre-wrap; overflow-wrap: anywhere; }
.custom-chat-reference table { min-width: 760px; }
.overlay-custom-editor [data-custom-errors] button { white-space: normal; text-align: left; color: var(--danger, #ff758f); }
.overlay-custom-editor [data-custom-status] {
  overflow-wrap: anywhere;
}
.overlay-custom-editor [data-custom-status][data-error="true"] {
  color: var(--danger, #ff758f);
}
