body.sjs-pdf-page {
  margin: 0;
  background: #002c27;
  overflow: hidden;
}

.sjs-pdf-page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.sjs-pdf-page__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(16px, 3vw, 32px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  flex-shrink: 0;
  z-index: 1100;
  position: relative;
}

.sjs-pdf-page__title {
  margin: 0;
  font-family: Magnat, Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  line-height: 1.1;
  color: #f5ece4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.sjs-pdf-page__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.sjs-pdf-page__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 253, 249, 0.35);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.08);
  color: #f5ece4;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sjs-pdf-page__download:hover,
.sjs-pdf-page__download:focus-visible {
  background: #b9d7ca;
  color: #002c27;
  border-color: #b9d7ca;
}

.sjs-pdf-page__close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 253, 249, 0.35);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.08);
  color: #fffdf9;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sjs-pdf-page__close:hover,
.sjs-pdf-page__close:focus-visible {
  background: #b9d7ca;
  color: #002c27;
  border-color: #b9d7ca;
  transform: rotate(90deg);
}

.sjs-pdf-viewer {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #002c27;
  direction: ltr;
}

.sjs-pdf-viewer__flip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #002c27;
  font-size: 0;
  isolation: isolate;
  contain: paint;
  touch-action: pan-y;
}

.sjs-pdf-book {
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), 0 6px 20px rgba(0, 0, 0, 0.35);
}

.sjs-pdf-page__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 20px;
  min-height: 58px;
  box-sizing: border-box;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  flex-shrink: 0;
  z-index: 1100;
  position: relative;
}

.sjs-pdf-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 253, 249, 0.3);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.08);
  color: #fffdf9;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.sjs-pdf-nav-btn:hover:not(:disabled),
.sjs-pdf-nav-btn:focus-visible:not(:disabled) {
  background: #b9d7ca;
  color: #002c27;
  border-color: #b9d7ca;
  transform: scale(1.04);
}

.sjs-pdf-nav-btn:disabled {
  opacity: 0.25;
  pointer-events: none;
}

.sjs-pdf-page__info {
  color: rgba(245, 236, 228, 0.7);
  font-size: 0.82rem;
  min-width: 90px;
  text-align: center;
}

.sjs-pdf-viewer__loader {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 44, 39, 0.98);
  transition: opacity 0.4s ease;
}

.sjs-pdf-viewer__spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(185, 215, 202, 0.25);
  border-top-color: #b9d7ca;
  border-radius: 50%;
  animation: sjs-pdf-spin 0.8s linear infinite;
}

@keyframes sjs-pdf-spin {
  to { transform: rotate(360deg); }
}

.sjs-pdf-viewer__loadertext {
  margin: 0;
  color: rgba(245, 236, 228, 0.6);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sjs-pdf-viewer__status {
  position: absolute;
  z-index: 1000;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 16px 24px;
  background: #f5ece4;
  color: #00372f;
  border-radius: 14px;
  font-size: 0.9rem;
  max-width: 80%;
  text-align: center;
  display: none;
}

.sjs-pdf-viewer__status[data-error='true'],
.sjs-pdf-viewer__message {
  display: block;
}

body.sjs-pdf-page--embed .sjs-pdf-page__bar {
  display: none;
}

@media (max-width: 640px) {
  .sjs-pdf-page__bar {
    flex-wrap: nowrap;
    padding: 8px 12px;
    gap: 12px;
  }

  .sjs-pdf-page__title {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sjs-pdf-page__actions { gap: 10px; }

  .sjs-pdf-page__download { padding: 9px 12px; }

  .sjs-pdf-page__download span { display: none; }

  .sjs-pdf-page__close { width: 36px; height: 36px; }

  .sjs-pdf-page__nav { min-height: 50px; padding: 6px 12px; gap: 12px; }

  .sjs-pdf-nav-btn span { display: none; }
  .sjs-pdf-nav-btn { padding: 10px 14px; }

  .sjs-pdf-page__info { font-size: 0.75rem; min-width: 64px; }
}
