/* AppDialog modal — external CSS required by CSP style-src 'self' */
.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  margin: 0;
  background: rgba(17, 24, 39, 0.55);
  overflow: auto;
  box-sizing: border-box;
}

.app-dialog-panel {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  max-height: min(80vh, 640px);
  overflow: auto;
  background: #fff;
  color: #111827;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  padding: 22px 22px 18px;
  font-family: inherit;
  box-sizing: border-box;
}

.app-dialog-panel h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}

.app-dialog-panel p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.app-dialog-actions button {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 9px 16px;
  font: inherit;
  cursor: pointer;
  min-height: 40px;
}

.app-dialog-actions button.app-dialog-primary {
  border-color: #ea580c;
  background: #ea580c;
  color: #fff;
}

.app-dialog-actions button.app-dialog-danger {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}

.app-dialog-actions button:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}

body.app-dialog-open {
  overflow: hidden;
}
