:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
.pdf-app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #dfe5ea;
  color: #ffffff;
}

button,
input {
  font: inherit;
}

button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  border-color: #83dbfb;
  background: rgba(131, 219, 251, 0.16);
  outline: none;
}

button:disabled {
  opacity: 0.38;
  cursor: default;
}

.sr-only {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.pdf-toolbar {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: #152d48;
  padding: 8px 12px;
  user-select: none;
}

.pdf-toolbar__group {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdf-page-field {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.pdf-page-field input {
  width: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  appearance: textfield;
}

.pdf-page-field input::-webkit-inner-spin-button,
.pdf-page-field input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

#zoom-value {
  width: 52px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.pdf-scroll {
  height: calc(100% - 54px);
  position: relative;
  overflow: auto;
  overscroll-behavior: contain;
  background: #dfe5ea;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(8, 40, 77, 0.55) rgba(255, 255, 255, 0.35);
  scrollbar-width: thin;
}

.pdf-pages {
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 18px 16px 28px;
}

.pdf-page {
  width: min(100%, 960px);
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  aspect-ratio: var(--page-ratio, 1200 / 1698);
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(8, 40, 77, 0.2);
}

.pdf-page::after {
  content: attr(data-page);
  position: absolute;
  right: 8px;
  bottom: 7px;
  color: rgba(8, 40, 77, 0.38);
  font-size: 11px;
  font-weight: 700;
}

.pdf-page canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
  background: #ffffff;
}

.pdf-page canvas + * {
  display: none;
}

.pdf-status {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  max-width: calc(100% - 40px);
  transform: translate(-50%, -50%);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 10px 34px rgba(8, 40, 77, 0.14);
  color: #163451;
  padding: 15px 18px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

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

.pdf-status a {
  display: block;
  margin-top: 10px;
  color: #006fae;
}

@media (max-width: 520px) {
  button {
    width: 34px;
    height: 36px;
    border-radius: 6px;
    font-size: 21px;
  }

  .pdf-toolbar {
    height: 50px;
    gap: 5px;
    padding: 7px 8px;
  }

  .pdf-toolbar__group {
    gap: 4px;
  }

  .pdf-page-field {
    height: 36px;
    gap: 3px;
    padding: 0 6px;
    font-size: 12px;
  }

  .pdf-page-field input {
    width: 30px;
    font-size: 13px;
  }

  #zoom-value {
    width: 42px;
    font-size: 11px;
  }

  .pdf-scroll {
    height: calc(100% - 50px);
  }

  .pdf-pages {
    gap: 10px;
    padding: 10px 8px 18px;
  }
}

@media (max-width: 350px) {
  #zoom-value {
    display: none;
  }
}
