#pdfModal .modal-window {
  max-width: 1180px;
  width: min(1180px, 100%);
  height: min(92vh, 920px);
}

#pdfModal .vnp-pdf-modal-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  background: #d6d3d1;
  display: flex;
}

.vnp-flip {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: #1c1917;
}

.vnp-flip-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #fafaf9;
  border-bottom: 1px solid #e7e5e4;
}

.vnp-flip-tools,
.vnp-flip-pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vnp-flip-tools button,
.vnp-flip-download {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e7e5e4;
  background: #fff;
  color: #44403c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.vnp-flip-tools button:disabled {
  opacity: 0.4;
  cursor: default;
}

.vnp-flip-tools button.is-on {
  background: #fef2f2;
  color: #9f1239;
  border-color: #fecdd3;
}

.vnp-flip-page-input {
  width: 52px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e7e5e4;
  text-align: center;
  font-weight: 700;
  color: #1c1917;
  background: #fff;
}

.vnp-flip-total {
  font-size: 13px;
  font-weight: 600;
  color: #57534e;
  white-space: nowrap;
}

.vnp-flip-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 28px 28px;
}

.vnp-flip-book {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 16px 36px rgba(28, 25, 23, 0.18),
    0 36px 70px rgba(28, 25, 23, 0.14);
  touch-action: none;
  user-select: none;
}

.vnp-flip-book canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.vnp-flip-hot,
.vnp-flip-edge {
  position: absolute;
  top: 0;
  bottom: 0;
}

.vnp-flip-hot { z-index: 2; }
.vnp-flip-edge {
  z-index: 4;
  width: 84px;
  cursor: ew-resize;
}

.vnp-flip-book.is-dragging .vnp-flip-edge { cursor: grabbing; }
.vnp-flip-book.is-turning .vnp-flip-hot { pointer-events: none; }

.vnp-flip-edge-prev { left: 0; }
.vnp-flip-edge-next { right: 0; }

.vnp-flip-link {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.vnp-flip-link:hover,
.vnp-flip-link:focus-visible {
  background: rgba(159, 18, 57, 0.12);
  outline: none;
}

.vnp-flip-status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(214, 211, 209, 0.92);
  z-index: 6;
  text-align: center;
  padding: 24px;
  font-size: 14px;
  color: #44403c;
}

.vnp-flip-status[hidden] { display: none; }

.vnp-flip-spin {
  width: 36px;
  height: 36px;
  border: 3px solid #e7e5e4;
  border-top-color: #9f1239;
  border-radius: 50% !important;
  animation: vnp-flip-spin 0.8s linear infinite;
}

@keyframes vnp-flip-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 800px) {
  .vnp-flip-stage { padding: 12px; }
  .vnp-flip-bar { flex-wrap: wrap; }
  .vnp-flip-edge { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .vnp-flip-spin { animation: none; }
}
