.vln-pdf {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  height: 640px;
  margin: 1.25rem 0 1.75rem;
  background: #ececec;
  color: #222;
  overflow: hidden;
  font-family: MarcinAntB, Arial, sans-serif;
}

.vln-pdf__fallback {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
}

.vln-pdf.is-ready .vln-pdf__fallback {
  display: none;
}

.vln-pdf__main {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.vln-pdf__top {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  background: #2e1a46;
  flex: 0 0 auto;
}

.vln-pdf__logo {
  display: flex;
  align-items: center;
  height: 26px;
}

.vln-pdf__logo img {
  height: 26px;
  width: auto;
  display: block;
}

.vln-pdf__titlebar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 16px;
  background: #d4d4d4;
  flex: 0 0 auto;
}

.vln-pdf__titlebar .vln-pdf__title {
  margin: 0;
  max-width: 100%;
  color: #555;
  font-family: MarcinAntB, Arial, sans-serif;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vln-pdf__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #ececec;
}

.vln-pdf.is-overflow .vln-pdf__stage {
  overflow: auto;
}

.vln-pdf__pages {
  min-height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

.vln-pdf.is-overflow .vln-pdf__pages {
  align-items: flex-start;
  justify-content: flex-start;
  width: max-content;
  min-width: 100%;
}

.vln-pdf__page {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  line-height: 0;
}

.vln-pdf__page canvas {
  display: block;
}

.vln-pdf__status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #222;
  font-size: 0.95rem;
}

.vln-pdf__status a {
  color: #2e1a46;
}

.vln-pdf__count {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  padding: 3px 8px;
  background: #4a4a4a;
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.vln-pdf__tools {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #2e1a46;
  color: #fff;
  min-height: 0;
}

.vln-pdf__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  flex: 0 0 auto;
}

.vln-pdf__tools-stack {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding-bottom: 6px;
}

.vln-pdf__tools button,
.vln-pdf__tools a {
  width: 40px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  border-radius: 2px;
}

.vln-pdf__tools button:hover,
.vln-pdf__tools a:hover,
.vln-pdf__close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.vln-pdf__tools .vln-pdf__zoom {
  font-family: MarcinAntB, Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.vln-pdf__hit {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 88px;
  margin-top: -44px;
  border: 0;
  padding: 0;
  color: #fff;
  background: rgba(80, 80, 80, 0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vln-pdf__hit svg {
  width: 18px;
  height: 32px;
  display: block;
}

.vln-pdf__hit--prev {
  left: 0;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  padding-left: 4px;
}

.vln-pdf__hit--next {
  right: 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  padding-right: 4px;
}

.vln-pdf__hit:hover:not(:disabled) {
  background: rgba(46, 26, 70, 0.72);
}

.vln-pdf__hit:disabled {
  opacity: 0.28;
  cursor: default;
}

.vln-pdf__close {
  display: none;
  position: absolute;
  top: 8px;
  right: 54px;
  z-index: 4;
  width: 36px;
  height: 36px;
  border: 0;
  background: rgba(46, 26, 70, 0.88);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.vln-pdf.is-full .vln-pdf__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vln-pdf.is-full {
  position: fixed;
  inset: 0;
  z-index: 100000;
  width: 100vw;
  height: 100vh;
  max-height: none;
  margin: 0;
}

@media (max-width: 640px) {
  .vln-pdf {
    grid-template-columns: minmax(0, 1fr) 40px;
    height: 520px;
  }

  .vln-pdf__pages {
    padding: 12px 10px 40px;
  }

  .vln-pdf__titlebar .vln-pdf__title {
    font-size: 11px;
  }
}
