/* Empire Books Publishing — pure-site additions (popup, WhatsApp, drawer, dropdowns). */

/* ---------------------------------------------- desktop dropdown hover */
@media (min-width: 1024px) {
  header nav .relative:hover > div.absolute,
  header nav .relative:focus-within > div.absolute {
    visibility: visible;
    opacity: 1;
    translate: -50% 0;
  }
}

/* ------------------------------------------------------- quote popup */
.quote-popup {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.quote-popup[hidden] {
  display: none;
}
.quote-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}
.quote-popup__panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border-radius: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--color-background, #faf9f7);
  padding: 1.5rem;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.55);
  animation: quote-pop 0.22s ease-out;
}
@media (min-width: 640px) {
  .quote-popup__panel { padding: 2rem; }
}
@keyframes quote-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.quote-popup__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  color: var(--color-primary, #111111);
  background: rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease;
}
.quote-popup__close:hover { background: rgba(0, 0, 0, 0.12); }

/* ------------------------------------------------------ WhatsApp float */
.wa-float {
  position: fixed;
  left: 1.1rem;
  bottom: 1.1rem;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 9999px;
  background: #25d366;
  color: #fff;
  box-shadow: 0 14px 34px -12px rgba(18, 140, 70, 0.65);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wa-float:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 20px 40px -12px rgba(18, 140, 70, 0.75);
}
.wa-float svg {
  width: 1.9rem;
  height: 1.9rem;
}

/* ------------------------------------------------------- mobile drawer */
.mobile-drawer {
  position: sticky;
  top: 64px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--color-background, #faf9f7);
  padding: 1rem 1.25rem 1.4rem;
  box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.35);
}
.mobile-drawer[hidden] { display: none; }
.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.mobile-drawer nav a {
  padding: 0.15rem 0;
}
@media (min-width: 1024px) {
  .mobile-drawer { display: none; }
}

/* --------------------------------------------------- scrollbars (nice) */
.nice-scroll::-webkit-scrollbar { width: 8px; }
.nice-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 9999px;
}
