/* Results only: do not recolor execution confirmations or printable labels. */
[data-result-dialog] {
  --result-color: #285a77;
  --result-background: #f0f6fa;
  --result-border: #c1d5e2;
  border-top: 5px solid var(--result-color);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
[data-result-dialog][data-result-kind="error"] {
  --result-color: #a12622;
  --result-background: #fff3f1;
  --result-border: #e6b9b3;
}
[data-result-dialog][data-result-kind="warning"] {
  --result-color: #875000;
  --result-background: #fff8e8;
  --result-border: #dfc58b;
}
[data-result-dialog][data-result-kind="success"] {
  --result-color: #176747;
  --result-background: #eef8f2;
  --result-border: #b9d9c5;
}
[data-result-dialog] .result-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
[data-result-dialog] .result-heading > div { min-width: 0; }
[data-result-dialog] .result-icon {
  display: grid; place-items: center; flex: 0 0 36px; height: 36px;
  border-radius: 50%; background: var(--result-background); color: var(--result-color);
  border: 1px solid var(--result-border); font: 700 23px/1 sans-serif;
}
[data-result-dialog] .result-label { display: block; margin-bottom: 4px; color: var(--result-color); font-size: 12px; font-weight: 600; }
[data-result-dialog] h2 { margin: 0; color: var(--result-color); overflow-wrap: anywhere; }
[data-result-dialog] #operation-result-message {
  margin: 0; padding: 14px 16px; border: 1px solid var(--result-border);
  border-left: 4px solid var(--result-color); border-radius: 6px;
  background: var(--result-background); color: var(--result-color);
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7;
  max-height: 48dvh; overflow-y: auto;
}
/* Acknowledge closes the message; it is not a destructive action. Keep the green button. */
@media (max-width: 600px) {
  [data-result-dialog] .result-heading { gap: 10px; margin-bottom: 14px; }
  [data-result-dialog] #operation-result-message { padding: 12px; }
}
@media print { [data-result-dialog] { display: none !important; } }
