/* Native dialog keeps pointer input and keyboard focus inside one signature pad. */
dialog.ebner-signature {
  box-sizing: border-box; width: min(780px, calc(100vw - 32px)); max-width: none;
  max-height: calc(100dvh - 24px); margin: auto; padding: 24px;
  border: 1px solid #dce0e5; border-radius: 16px; color: #18212b; background: #fff;
  box-shadow: 0 24px 80px #0003; overflow-y: auto; overscroll-behavior: contain;
  font-family: inherit; color-scheme: light;
}
.ebner-signature::backdrop { background: #17212bcc; }
.ebner-signature * { box-sizing: border-box; }
.ebner-signature h2 { font-size: 21px; line-height: 1.3; margin: 0 0 6px; font-weight: 650; }
.ebner-signature header p { margin: 0 0 20px; color: #616b76; font-size: 14px; }
.ebner-signature .signature-surface { position: relative; border: 1px solid #abb5c1; border-radius: 8px; overflow: hidden; background: #fff; }
.ebner-signature canvas { display: block; width: 100%; height: auto; aspect-ratio: 20 / 9; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.ebner-signature .signature-guide { pointer-events: none; position: absolute; left: 6%; right: 6%; bottom: 24%; border-top: 1px dashed #d7dce2; }
.ebner-signature .signature-tools { display: flex; gap: 8px; margin-top: 10px; }
.ebner-signature button { width: auto; min-height: 44px; padding: 10px 15px; border: 1px solid #cbd1d9; border-radius: 7px; background: #fff; color: #28323d; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ebner-signature button:hover:not(:disabled) { background: #f3f5f7; }
.ebner-signature button:focus-visible { outline: 3px solid #a6222c; outline-offset: 3px; }
.ebner-signature button:disabled { opacity: .45; cursor: default; }
.ebner-signature button.signature-primary { color: #fff; background: #ac2430; border-color: #ac2430; }
.ebner-signature button.signature-primary:hover:not(:disabled) { background: #8e1e28; }
.ebner-signature .signature-status { margin: 12px 0; min-height: 38px; font-size: 13px; line-height: 1.45; color: #55616f; }
.ebner-signature footer { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid #e3e7eb; padding-top: 16px; }
#view-work-report-editor button.sig-display { width: 100%; font: inherit; font-weight: 400; color: #616b76; }
#view-work-report-editor button.sig-display:focus-visible { outline: 3px solid #ac2430; outline-offset: 3px; }
@media (max-width: 540px) {
  dialog.ebner-signature { width: calc(100vw - 16px); padding: 18px 14px; border-radius: 12px; }
  .ebner-signature h2 { font-size: 19px; }
  .ebner-signature footer { display: grid; grid-template-columns: 1fr; }
  .ebner-signature footer .signature-primary { grid-row: 1; }
}
@media (max-height: 500px) and (min-width: 541px) {
  dialog.ebner-signature { width: min(680px, calc(100vw - 24px)); padding: 12px 18px; }
  .ebner-signature header p { margin-bottom: 8px; }
  .ebner-signature .signature-surface { width: min(100%, 400px); margin: auto; }
  .ebner-signature .signature-status { min-height: 0; margin: 6px 0; }
  .ebner-signature footer { padding-top: 8px; }
}
