/* ===========================
   SELECT OVERRIDES (kill theme arrows)
   =========================== */

.kkb-app .kkb-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-image: none !important; /* kill theme arrow background */
  box-shadow: none !important;
  border-radius: 999px;
  border: 1px solid #ddd;
  background-color: #fafafa;
  padding: 0.45rem 2.2rem 0.45rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
}

/* Hide the IE/Edge default arrow, just in case */
.kkb-app .kkb-select::-ms-expand {
  display: none;
}

/* ===========================
   CHAPTER NAVIGATION – CIRCULAR ARROWS
   =========================== */

.kkb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.6rem;
}

.kkb-nav-btn {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.5rem;
  color: #4b5563;
  cursor: pointer;

  transition:
    background-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.05s ease,
    color 0.12s ease;
}

.kkb-nav-btn:hover:not(:disabled) {
  background: #f9fafb;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
  transform: translateY(-1px);
}

.kkb-nav-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}

.kkb-nav-btn[disabled] {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

/* Dark mode versions of the nav buttons */

.kkb-app.kkb-dark .kkb-nav-btn {
  background: #111827;
  border-color: #374151;
  color: #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.kkb-app.kkb-dark .kkb-nav-btn:hover:not(:disabled) {
  background: #1f2937;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85);
}

/* Mobile tweaks for nav – keep up-arrow centered */

@media (max-width: 768px) {
  .kkb-nav {
    margin-top: 1.4rem;
    gap: 1rem;
    justify-content: center;
    flex-wrap: nowrap;          /* make sure buttons stay in one row */
  }

  .kkb-nav-btn {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }

  /* slightly smaller up-arrow in the middle, still clearly visible */
  .kkb-nav-btn.kkb-nav-top {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

/* ===========================
   SCROLL TO TOP BUTTON
   =========================== */

.kkb-scroll-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.14);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.3rem;
  color: #4b5563;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);

  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease,
    color 0.12s ease;

  z-index: 100001; /* above overlay background; below anything crazy */
}

.kkb-scroll-top--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.kkb-scroll-top:hover {
  background: #f9fafb;
  box-shadow: 0 8px 22px rgba(0,0,0,0.16);
}

/* Dark theme version */
.kkb-scroll-top.kkb-scroll-top--dark {
  background: #111827;
  border-color: #374151;
  color: #e5e7eb;
  box-shadow: 0 6px 20px rgba(0,0,0,0.7);
}

.kkb-scroll-top.kkb-scroll-top--dark:hover {
  background: #1f2937;
}

/* ===========================
