.bounded-document-host { min-width: 0; max-width: 100%; }
.bounded-document-host > iframe.document-renderer-frame { display: block; width: 100%; height: clamp(22rem, 70dvh, 56rem) !important; min-height: 0; border: 1px solid var(--line, #cbd4dc); border-radius: 4px; background: #fff; }
.document-viewer { width: 100%; min-width: 0; border: 1px solid #cbd4dc; border-radius: 4px; overflow: hidden; background: #eef1f3; color: #192d43; }
.document-viewer-toolbar { min-height: 52px; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #cbd4dc; background: #fff; flex-wrap: wrap; }
.document-viewer-name { flex: 1 1 180px; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.document-viewer-toolbar .icon-button { flex: 0 0 32px; width: 32px; height: 32px; padding: 6px; display: grid; place-items: center; border-radius: 4px; }
.document-viewer-page-input { flex: 0 0 48px; width: 48px; min-width: 0; height: 32px; padding: 4px; text-align: center; border: 1px solid #bdcbd5; border-radius: 4px; color: #192d43; background: #fff; font: inherit; font-size: 12px; }
.document-viewer-page-count { min-width: 28px; font-size: 12px; white-space: nowrap; }
.document-viewer-zoom { height: 32px; max-width: 122px; min-width: 90px; padding: 3px 6px; border: 1px solid #bdcbd5; border-radius: 4px; background: #fff; color: #192d43; font: inherit; font-size: 12px; }
.document-viewer-pages { height: clamp(22rem, 65dvh, 54rem); overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 16px; scrollbar-gutter: stable; }
.document-viewer-page { flex: 0 0 auto; position: relative; width: 100%; margin-inline: auto; min-height: 160px; aspect-ratio: 595 / 842; background: #fff; box-shadow: 0 1px 4px #182c4320; }
.document-viewer-page canvas { display: block; width: 100%; height: auto; }
.document-viewer-placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: #6c7a87; }
.document-viewer-status { margin: 0; padding: 12px 16px; font-size: 13px; background: #f5f8fa; border-bottom: 1px solid #d4dde4; }
.document-viewer-status.is-error { color: #9d2539; background: #fff1f2; }
.document-viewer-status button { margin: 8px 0 0 10px; }
.document-viewer.is-expanded { position: fixed; inset: 16px; z-index: 1600; width: auto; max-width: none; display: flex; flex-direction: column; box-shadow: 0 0 0 100vmax #10203580; }
.document-viewer.is-expanded .document-viewer-pages { height: auto; flex: 1 1 auto; min-height: 0; }
.document-viewer :focus-visible { outline: 2px solid #157d81; outline-offset: 2px; }
.document-viewer .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .document-viewer-toolbar { gap: 5px; padding: 7px; }
  .document-viewer-name { flex-basis: 100%; }
  .document-viewer-pages { height: 60dvh; min-height: 280px; padding: 8px; gap: 12px; }
  .document-viewer.is-expanded { inset: 6px; }
}
