.pdf-viewer-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  position: relative;
  background: white;
}

.toolbar {
  z-index: 1;
  position: sticky;
  top: 0;
  background: #f5f5f5;
  padding: 8px 16px;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.goto-input {
  width: 60px;
}

.sync-scroll {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.canvas-container {
  height: 80vh;
  overflow-y: auto;
  padding: 10px;
  flex-grow: 1;
}

.icon-button {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

.icon-button:hover {
  color: #007bff;
}

.global-loader {
  text-align: center;
  font-weight: bold;
  padding: 1rem;
  color: #007bff;
}
.canvas-container.dark-mode {
  background-color: #2e2e2e;
  color: white;
}

.canvas-container.dark-mode canvas {
  filter: invert(1) hue-rotate(180deg);
}

.textLayer {
  color: transparent; /* text layer is invisible but selectable */
  user-select: text;
  -webkit-user-select: text;
  pointer-events: auto;
  font-family: sans-serif;
  line-height: 1;
}