.pdf-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: none;

  background: rgba(0, 0, 0, 0.72);

  padding: 20px;
  box-sizing: border-box;
}

.pdf-viewer-overlay.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-viewer-shell {
  width: min(1200px, 100%);
  height: min(92vh, 1000px);

  display: flex;
  flex-direction: column;

  background: #f2f2f2;

  border-radius: 10px;
  overflow: hidden;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.pdf-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  padding: 12px 16px;

  background: #ffffff;

  border-bottom: 1px solid #d8d8d8;
}

.pdf-viewer-actions {
  display: flex;
  align-items: center;

  gap: 8px;

  flex-wrap: wrap;
  justify-content: flex-end;
}

.pdf-viewer-actions button {
  border: 1px solid #cccccc;

  background: #ffffff;

  border-radius: 6px;

  padding: 7px 11px;

  cursor: pointer;

  font: inherit;
}

.pdf-viewer-actions button:hover {
  background: #f0f0f0;
}

.pdf-viewer-actions .pdf-close {
  margin-left: 6px;
}

.pdf-canvas-container {
  flex: 1;

  overflow: auto;

  padding: 24px;

  text-align: center;
}

#pdf-canvas {
  max-width: none;

  background: white;

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.pdf-loading,
.pdf-error {
  padding: 14px 18px;

  text-align: center;
}

.pdf-error {
  color: #9d1c1c;
}

body.pdf-viewer-open {
  overflow: hidden;
}

@media (max-width: 700px) {

  .pdf-viewer-overlay {
    padding: 0;
  }

  .pdf-viewer-shell {
    width: 100%;
    height: 100vh;

    border-radius: 0;
  }

  .pdf-viewer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdf-canvas-container {
    padding: 12px;
  }
}