.tm-document-viewer {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: none;
  background: rgba(12, 18, 28, .82);
  backdrop-filter: blur(1px);
  padding: 20px;
}
.tm-document-viewer.is-open { display: flex; flex-direction: column; }
body.tm-document-viewer-open { overflow: hidden !important; }
.tm-document-viewer__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto 12px;
  color: #fff;
}
.tm-document-viewer__heading { min-width: 0; }
.tm-document-viewer__title {
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tm-document-viewer__meta { color: rgba(255,255,255,.68); font-size: .82rem; }
.tm-document-viewer__actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.tm-document-viewer__download {
  border: 1px solid rgba(255,255,255,.36);
  color: #fff;
  background: rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 7px 12px;
  text-decoration: none;
  font-weight: 600;
}
.tm-document-viewer__download:hover { color: #fff; background: rgba(255,255,255,.16); }
.tm-document-viewer__close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
}
.tm-document-viewer__close:hover { background: rgba(255,255,255,.22); }
.tm-document-viewer__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
}
.tm-document-viewer__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0,0,0,.35);
}
.tm-document-viewer__frame {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  background: #fff;
  border-radius: 8px;
}
.tm-document-viewer__fallback {
  max-width: 560px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  color: #fff;
  text-align: center;
}
.tm-document-preview-trigger {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .35rem .55rem !important;
  border-radius: .45rem;
  line-height: 1.15;
}
.tm-document-preview-trigger:hover,
.tm-document-preview-trigger:focus-visible { text-decoration: underline; }
@media (max-width: 767.98px) {
  .tm-document-viewer { padding: 10px; }
  .tm-document-viewer__bar { gap: 8px; }
  .tm-document-viewer__download { padding: 6px 9px; }
  .tm-document-viewer__close { width: 34px; height: 34px; }
}
