.surfwidget-root,
.surfwidget-mount {
  width: 100%;
  height: 100%;
  min-height: 320px;
}

/* The widget container has a fixed height in documents; never let viewer
   internals spill over the content that follows. */
.surfwidget-mount {
  overflow: hidden;
}

.surfwidget-root:fullscreen {
  background: #fff;
  padding: 1rem;
  box-sizing: border-box;
}

/* Visibility is controlled by the [hidden] attribute (toggled in
   surfwidget.js); print always shows the fallback instead of the canvas. */
.surfwidget-author-fallback {
  padding: 1rem;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #1f2937;
  font: 14px/1.45 system-ui, sans-serif;
}

@media print {
  .surfwidget-mount {
    display: none !important;
  }

  .surfwidget-author-fallback {
    display: block !important;
  }
}
