.pdffv-wrapper,
.pdffv-wrapper * {
  box-sizing: border-box;
}

.pdffv-wrapper {
  --pdffv-accent: #1b463c;
  --pdffv-accent-hover: #298633;
  position: relative;
  width: 100%;
  max-width: var(--pdffv-max-width, 100%);
  margin: 0 auto;
  padding: 18px;
  border-radius: 14px;
  background: #f2f3f3;
  overflow: hidden;
}

.pdffv-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  height: auto;
  overflow: hidden;
  touch-action: pan-y;
}

.pdffv-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transform-origin: center center;
  transition: transform .18s ease;
}

.pdffv-book {
  margin: 0 auto !important;
}

.pdffv-book .stf__parent,
.pdffv-book .stf__wrapper {
  margin: 0 auto !important;
}

.pdffv-page {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fff;
  overflow: hidden;
}

.pdffv-page canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.pdffv-loading,
.pdffv-error {
  width: 100%;
  padding: 38px 20px;
  text-align: center;
  color: #424242;
}

.pdffv-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pdffv-control,
.pdffv-download {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 42px;
  min-height: 42px;
  margin: 0;
  padding: 9px 13px;
  border: 0;
  border-radius: 8px;
  background: var(--pdffv-accent);
  color: #fff !important;
  font: inherit;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color .18s ease, opacity .18s ease, transform .18s ease;
}

.pdffv-control:hover,
.pdffv-download:hover {
  background: var(--pdffv-accent-hover);
  color: #fff !important;
  transform: translateY(-1px);
}

.pdffv-control:focus-visible,
.pdffv-download:focus-visible {
  outline: 3px solid rgba(41, 134, 51, .28);
  outline-offset: 2px;
}

.pdffv-control:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

.pdffv-control svg,
.pdffv-download svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.pdffv-pagenum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  color: #424242;
  font-size: 14px;
  font-weight: 600;
}

.pdffv-wrapper:fullscreen {
  max-width: none;
  width: 100vw;
  height: 100vh;
  padding: 18px;
  border-radius: 0;
  background: #e9ebeb;
}

.pdffv-wrapper:fullscreen .pdffv-stage {
  height: calc(100vh - 92px);
}

@media (max-width: 767px) {
  .pdffv-wrapper {
    padding: 10px;
    border-radius: 10px;
  }

  .pdffv-stage {
    min-height: 0;
  }

  .pdffv-controls {
    gap: 6px;
    margin-top: 10px;
  }

  .pdffv-control,
  .pdffv-download {
    min-width: 40px;
    min-height: 40px;
    padding: 9px 10px;
  }

  .pdffv-download span {
    display: none;
  }

  .pdffv-pagenum {
    min-width: 72px;
    min-height: 40px;
    padding-inline: 8px;
  }
}
