/* JHS Flipbook — on-page book-style PDF viewer overlay */
.jhs-fb-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  background: rgba(9, 16, 38, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.jhs-fb-overlay.open { display: flex; flex-direction: column; }

.jhs-fb-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  color: #fff;
  font-family: "Plus Jakarta Sans", "Nunito", system-ui, sans-serif;
}
.jhs-fb-title {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jhs-fb-bar a,
.jhs-fb-bar button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease-out;
}
.jhs-fb-bar a:hover,
.jhs-fb-bar button:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

.jhs-fb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  padding: 6px 56px 4px;
}
.jhs-fb-book { touch-action: pan-y; max-width: 100%; max-height: 100%; }
.jhs-fb-book .stf__parent { margin: 0 auto; max-width: 100%; max-height: 100%; }
.jhs-fb-book img { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); background: #fff; }

.jhs-fb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s ease-out, transform 0.2s ease-out;
}
.jhs-fb-nav:hover { background: rgba(255, 255, 255, 0.3); }
.jhs-fb-nav.prev { left: 10px; }
.jhs-fb-nav.next { right: 10px; }

.jhs-fb-count {
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-family: "Plus Jakarta Sans", "Nunito", system-ui, sans-serif;
  padding: 8px 0 14px;
}

.jhs-fb-spin {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Plus Jakarta Sans", "Nunito", system-ui, sans-serif;
  font-size: 14px;
}
.jhs-fb-spin::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: jhsFbSpin 0.9s linear infinite;
}
@keyframes jhsFbSpin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .jhs-fb-stage { padding: 4px 8px; }
  .jhs-fb-nav { display: none; } /* swipe to flip on touch */
}

@media (prefers-reduced-motion: reduce) {
  .jhs-fb-spin::before { animation-duration: 2s; }
}
