/* Document viewer: make sure only one state is visible at a time,
   and that the PDF fills the window. Scoped to the viewer only. */

#m-doc-viewer [hidden],
#m-doc-viewer[hidden] {
  display: none !important;
}

#m-doc-viewer #docv-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

#m-doc-viewer #docv-loading,
#m-doc-viewer #docv-error,
#m-doc-viewer #docv-fallback {
  margin: auto;
  max-width: 420px;
  padding: 32px 20px;
  text-align: center;
}

#m-doc-viewer #docv-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
}

#m-doc-viewer #docv-iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 60vh;
  border: 0;
  background: #fff;
}

body.docv-locked {
  overflow: hidden;
}

@media (max-width: 640px) {
  #m-doc-viewer > * {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}
#m-doc-viewer .docv-warning {
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--gd);
  border-radius: var(--r);
  background: var(--gd-d);
  color: var(--tx);
  font-size: 12.5px;
}

#m-doc-viewer .docv-warning[hidden] {
  display: none !important;
}
