.modul-media-preview--pdf-flipbook {
  overflow: hidden;
  background: #1a2332;
}

.modul-pdf-viewer {
  position: relative;
}

.modul-pdf-viewer.is-loading {
  min-height: 280px;
  padding: 24px 16px;
}

.modul-pdf-viewer.is-ready {
  padding: 14px 14px 12px;
}

.modul-pdf-viewer.is-error {
  padding: 24px 16px;
}

.modul-pdf-viewer.is-loading .modul-pdf-viewer__wrap,
.modul-pdf-viewer.is-loading .modul-pdf-viewer__fallback,
.modul-pdf-viewer.is-ready .modul-pdf-viewer__status,
.modul-pdf-viewer.is-ready .modul-pdf-viewer__fallback,
.modul-pdf-viewer.is-error .modul-pdf-viewer__status,
.modul-pdf-viewer.is-error .modul-pdf-viewer__wrap {
  display: none !important;
}

.modul-pdf-viewer__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.modul-pdf-viewer__spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(226, 232, 240, 0.25);
  border-top-color: #86efac;
  border-radius: 50%;
  animation: modul-pdf-spin 0.8s linear infinite;
}

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

.modul-pdf-viewer__wrap {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.modul-pdf-viewer__canvas-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  line-height: 0;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.modul-pdf-viewer__canvas {
  display: block;
  max-width: 100%;
  height: auto;
  transition: opacity 140ms ease;
}

.modul-pdf-viewer__canvas.is-switching {
  opacity: 0.72;
}

.modul-pdf-viewer__toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
}

.modul-pdf-viewer__nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.modul-pdf-viewer__nav:hover:not(:disabled) {
  background: rgba(22, 101, 52, 0.85);
  border-color: rgba(134, 239, 172, 0.45);
}

.modul-pdf-viewer__nav:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.modul-pdf-viewer__page-info {
  min-width: 72px;
  text-align: center;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.modul-pdf-viewer__fallback {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  min-height: 200px;
  padding: 20px 16px;
  color: #e2e8f0;
}

.modul-pdf-viewer__fallback p {
  margin: 0;
  max-width: 36ch;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (max-width: 680px) {
  .modul-pdf-viewer.is-ready {
    padding-inline: 8px;
  }

  .modul-pdf-viewer__nav span {
    display: none;
  }

  .modul-pdf-viewer__nav {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }
}
