/* One consistent dialog for editing, confirmations and notices across RPDS. */
dialog.rpds-dialog {
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #dde5d5;
  border-radius: 18px;
  background: #fff;
  color: #000;
  font-family: inherit;
  box-shadow: 0 24px 80px rgba(20, 30, 15, .2);
  overscroll-behavior: contain;
}
dialog.rpds-dialog::backdrop { background: rgba(24, 32, 20, .36); }
.rpds-dialog [hidden] { display: none !important; }
.rpds-dialog .rpds-dialog-form { display: flex; flex-direction: column; min-height: 310px; margin: 0; }
.rpds-dialog .rpds-dialog-header { display: flex; align-items: flex-start; gap: 14px; padding: 26px 28px 0; }
.rpds-dialog .rpds-dialog-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border: 1px solid #dce6c9; border-radius: 12px; background: #f2f7e9; }
.rpds-dialog .rpds-dialog-icon svg { width: 21px; height: 21px; stroke: #536b26; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rpds-dialog[data-tone="danger"] .rpds-dialog-icon,
.rpds-dialog[data-tone="error"] .rpds-dialog-icon { background: #fff1ef; border-color: #f4d4cf; }
.rpds-dialog[data-tone="danger"] .rpds-dialog-icon svg,
.rpds-dialog[data-tone="error"] .rpds-dialog-icon svg { stroke: #a63224; }
.rpds-dialog .rpds-dialog-heading { flex: 1; min-width: 0; padding-top: 1px; }
.rpds-dialog .rpds-dialog-title { margin: 0 0 6px; font-size: 20px; line-height: 1.35; font-weight: 600; letter-spacing: -.02em; }
.rpds-dialog .rpds-dialog-message { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; font-weight: 400; }
.rpds-dialog .rpds-dialog-close { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; margin: -6px -8px 0 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #000; font-size: 26px; line-height: 1; cursor: pointer; }
.rpds-dialog .rpds-dialog-close:hover { background: #f1f5ec; }
.rpds-dialog .rpds-dialog-content { flex: 1; padding: 22px 28px 14px; }
.rpds-dialog .rpds-dialog-label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.rpds-dialog .rpds-dialog-input { display: block; width: 100%; min-height: 46px; margin: 0; padding: 10px 12px; border: 1px solid #cbd6bf; border-radius: 9px; background: #fff; color: #000; font: inherit; font-size: 15px; line-height: 1.5; }
.rpds-dialog .rpds-dialog-input:focus { outline: 3px solid rgba(127, 148, 48, .16); outline-offset: 1px; border-color: #7f9430; }
.rpds-dialog .rpds-dialog-input[aria-invalid="true"] { border-color: #b33c2b; }
.rpds-dialog .rpds-dialog-error { min-height: 20px; margin: 7px 0 0; font-size: 13px; line-height: 1.5; }
.rpds-dialog .rpds-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 28px; border-top: 1px solid #e6ebdf; background: #fafcf7; }
.rpds-dialog .rpds-dialog-button { min-width: 100px; min-height: 42px; margin: 0; padding: 10px 18px; border: 1px solid #cbd6bf; border-radius: 9px; background: #fff; color: #000; font: inherit; font-size: 14px; line-height: 1.4; font-weight: 600; cursor: pointer; }
.rpds-dialog .rpds-dialog-button:hover { background: #f1f5ec; }
.rpds-dialog .rpds-dialog-primary { border-color: #7f9430; background: #7f9430; color: #fff; }
.rpds-dialog .rpds-dialog-primary:hover { border-color: #657926; background: #657926; }
.rpds-dialog[data-tone="danger"] .rpds-dialog-primary { border-color: #b43c2c; background: #b43c2c; }
.rpds-dialog[data-tone="danger"] .rpds-dialog-primary:hover { border-color: #963123; background: #963123; }
.rpds-dialog button:focus-visible { outline: 3px solid #a5be3e; outline-offset: 3px; }
@media (max-width: 480px) {
  .rpds-dialog .rpds-dialog-header { padding: 22px 20px 0; gap: 12px; }
  .rpds-dialog .rpds-dialog-content { padding: 20px; }
  .rpds-dialog .rpds-dialog-actions { padding: 16px 20px; }
  .rpds-dialog .rpds-dialog-button { flex: 1; min-width: 0; }
}
