/* Document viewer styles never alter other OA attachments or native dialogs. */
.project-timeline-file-preview-host { width: 100%; height: 100%; min-width: 0; min-height: 0; }
.project-timeline-file-preview {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  color: #304d3a;
  background: #edf3ee;
}
.project-timeline-file-preview,
.project-timeline-file-preview * { scrollbar-width: none !important; }
.project-timeline-file-preview::-webkit-scrollbar,
.project-timeline-file-preview *::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
.project-timeline-file-document-scroll {
  min-width: 0;
  min-height: 0;
  padding: 20px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.project-timeline-file-document-page {
  position: relative;
  width: min(100%, 840px);
  margin: 0 auto 16px;
  background: #fff;
  box-shadow: 0 2px 9px #284c3412, 0 0 0 1px #d8e3db;
}
.project-timeline-file-document-page:last-child { margin-bottom: 0; }
.project-timeline-file-document-page > canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.project-timeline-file-document-frame { width: 100%; height: 100%; min-width: 0; min-height: 0; border: 0; background: #fff; }
.project-timeline-file-document-text {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  color: #304d3a;
  background: #fff;
  font: 14px/1.8 "Microsoft YaHei", "PingFang SC", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.project-timeline-file-document-scroll:focus-visible,
.project-timeline-file-document-text:focus-visible { outline: 2px solid #478d68; outline-offset: -3px; }
.project-timeline-file-preview-error { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; min-height: 160px; padding: 24px; }
.project-timeline-file-preview-error p,
.project-timeline-file-page-error { margin: 0; color: #855753 !important; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.project-timeline-file-page-error { padding: 18px; }
.project-timeline-preview-modal[data-linxi-modal-panel] .project-timeline-file-preview button.project-timeline-file-preview-retry {
  min-height: 38px;
  padding: 0 17px !important;
  border: 1px solid #b9d0c0 !important;
  border-radius: 9px !important;
  background: #e5f0e8 !important;
  color: #356745 !important;
  box-shadow: none !important;
  font-size: 13px;
}
.project-timeline-preview-modal[data-linxi-modal-panel] .project-timeline-file-preview button.project-timeline-file-preview-retry:hover { background: #d7e9dd !important; border-color: #9cbea8 !important; color: #285837 !important; }
.project-timeline-preview-modal[data-linxi-modal-panel] .project-timeline-file-preview button.project-timeline-file-preview-retry:active { background: #c8dfcf !important; color: #224d30 !important; }
.project-timeline-preview-modal[data-linxi-modal-panel] .project-timeline-file-preview button.project-timeline-file-preview-retry:focus-visible { outline: 2px solid #478d68 !important; outline-offset: 2px; }
@media (max-width: 720px) {
  .project-timeline-file-document-scroll { padding: 10px; }
  .project-timeline-file-document-page { margin-bottom: 10px; }
  .project-timeline-file-document-text { padding: 18px; }
  .project-timeline-preview-modal[data-linxi-modal-panel] .project-timeline-file-preview button.project-timeline-file-preview-retry { min-height: 44px; }
}
