/* Page layout features (js/page-layout.js): one non-editable layer per page. The layer itself is
 * no stacking context, so its parts order against the page body (z-index 1): the watermark and a
 * back border sit under the text, the line numbers and a front border over it. */
.udoc-pl-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.udoc-pl-border {
  position: absolute;
  box-sizing: border-box;
}
.udoc-pl-mark {
  position: absolute;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 50%;
  white-space: nowrap;
  font-weight: 700;
  text-align: center;
  overflow: visible;
}
.udoc-pl-mark > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.udoc-pl-mark > img.udoc-pl-washout {
  filter: contrast(.15) brightness(1.74);
}
.udoc-pl-lines {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.udoc-pl-ln {
  position: absolute;
  left: 0;
  overflow: visible;
  white-space: nowrap;
  text-align: right;
  color: #1a1a1a;
}
.udoc-pl-num {
  line-height: 0;
  font-variant-numeric: tabular-nums;
}
.page.virtual .udoc-pl-lines,
body.flow-mode .udoc-pl-layer { display: none; }

/* The hyphen of an engine line break inside a word: presentation only, never copied or saved. */
.ud-word-line-end[data-ud-hyphen="1"]::after { content: "-"; }

/* Dialogs (uiDialog extraHtml) */
#ui-prompt.udoc-pl-dialog .udoc-pl-form {
  display: grid;
  gap: 8px;
  margin-bottom: 6px;
}
#ui-prompt.udoc-pl-dialog .udoc-pl-group { display: grid; gap: 8px; }
#ui-prompt.udoc-pl-dialog .udoc-pl-group[hidden] { display: none; }
#ui-prompt.udoc-pl-dialog .udoc-pl-row {
  display: grid;
  grid-template-columns: 9em minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #344054;
  font-size: 12.5px;
}
#ui-prompt.udoc-pl-dialog .udoc-pl-row > :is(input:not([type="checkbox"]), select) {
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}
#ui-prompt.udoc-pl-dialog .udoc-pl-row > input[type="color"] { width: 64px; padding: 2px; }
#ui-prompt.udoc-pl-dialog .udoc-pl-row > input[type="checkbox"] { justify-self: start; width: 16px; height: 16px; }
#ui-prompt.udoc-pl-dialog .udoc-pl-row > input[type="file"] { height: auto; padding: 4px 0; border: 0; }
