/* Scoped to prompt editing: fixed light surfaces keep text legible in all themes. */
body[data-appearance] #promptEditorDialog {
  background: #f6fbfd !important;
  color: #183f50 !important;
  border: 1px solid #7c9fab !important;
  max-height: 92vh;
  overflow: auto;
}
body[data-appearance] #promptEditorDialog :is(h3,label,p,small,strong,b,span,pre) {
  color: #183f50 !important;
  -webkit-text-fill-color: #183f50 !important;
  opacity: 1 !important;
}
body[data-appearance] #promptEditorDialog :is(input,textarea,select) {
  min-width: 0;
  max-width: 100%;
  background: #fff !important;
  color: #183f50 !important;
  -webkit-text-fill-color: #183f50 !important;
  border: 1px solid #6d919f !important;
  opacity: 1 !important;
}
body[data-appearance] #promptEditorDialog :is(input,textarea)::placeholder {
  color: #48616c !important;
  -webkit-text-fill-color: #48616c !important;
  opacity: 1;
}
body[data-appearance] #promptEditorDialog :is(.prompt-version-panel,.prompt-template-test-result) {
  background: #edf5f8 !important;
  color: #183f50 !important;
}
body[data-appearance] #promptEditorDialog button {
  background: #fff !important;
  color: #183f50 !important;
  -webkit-text-fill-color: #183f50 !important;
  border: 1px solid #6d919f !important;
  opacity: 1 !important;
  white-space: nowrap;
}
body[data-appearance] #promptEditorDialog button.primary,
body[data-appearance] #promptEditorDialog button:hover:not(:disabled) {
  background: #07536b !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
body[data-appearance] #promptEditorDialog button:disabled {
  background: #dce8ed !important;
  color: #365663 !important;
  -webkit-text-fill-color: #365663 !important;
  cursor: not-allowed;
}
body[data-appearance] #promptEditorDialog :is(button,input,textarea,select):focus-visible {
  outline: 3px solid #096e8c !important;
  outline-offset: 2px;
}
body[data-appearance] #promptEditorDialog .is-error {
  color: #a51f19 !important;
  -webkit-text-fill-color: #a51f19 !important;
}
body[data-appearance] #promptEditorDialog .is-warning {
  color: #704d00 !important;
  -webkit-text-fill-color: #704d00 !important;
}
body[data-appearance] #promptEditorDialog .is-pass {
  color: #155737 !important;
  -webkit-text-fill-color: #155737 !important;
}
body[data-appearance] #promptEditorDialog .dialog-actions { flex-wrap: wrap; }
body[data-appearance] #promptEditorDialog .dialog-head > button { flex-shrink: 0; }
