/* ==========================================================
   BNK GROUP — Floating "Real Book" button + popup book
   (includes/book-modal.php)
   ========================================================== */

/* ---------- floating button (bottom-left, follows you everywhere) ---------- */
.book-fab {
  position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 90;   /* sits right above WhatsApp */
  display: flex; align-items: center; gap: 12px;
  padding: 6px 6px 6px 20px;
  flex-direction: row-reverse;
  border: 1px solid rgba(201,165,92,.6);
  border-radius: 999px;
  background: rgba(15,29,43,.72);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
  color: var(--cream); cursor: pointer;
  box-shadow: 0 14px 34px -14px rgba(0,0,0,.7);
  transition: transform .45s var(--ease), background .45s, border-color .45s, opacity .4s;
  animation: fabIn 1s var(--ease) 1.2s both;
}
.book-fab:hover { transform: translateY(-4px); background: rgba(15,29,43,.92); border-color: var(--gold); }
.book-fab__icon {
  position: relative; width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
}
.book-fab__icon::after {                     /* soft breathing ring */
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(201,165,92,.6); animation: fabPulse 2.6s ease-out infinite;
}
.book-fab__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--navy-900); stroke-width: 1.7; stroke-linejoin: round; }
.book-fab:hover .book-fab__icon svg { animation: bookWiggle .8s var(--ease); }
.book-fab__text { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--font-display); font-size: 1.02rem; letter-spacing: .04em; text-align: right; }
.book-fab__text small { font-family: var(--font-body); font-size: .58rem; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-light); }
@keyframes fabIn { from { opacity: 0; transform: translateY(30px); } }
@keyframes fabPulse { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes bookWiggle { 30% { transform: rotate(-10deg) scale(1.1); } 60% { transform: rotate(6deg); } }
.page-brochure .book-fab { display: none; }              /* that page IS the book */
.book-open .book-fab { opacity: 0; pointer-events: none; }

/* ---------- popup ---------- */
.book-modal {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center;
  visibility: hidden; pointer-events: none;
}
.book-modal__backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(201,165,92,.16), transparent 70%),
    rgba(6,13,21,.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .55s ease;
}
.book-modal__panel {
  position: relative;
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: stretch;
  padding: clamp(14px, 3vh, 28px) 0 clamp(10px, 2vh, 20px);
  opacity: 0; transform: translateY(40px) scale(.94);
  transition: opacity .6s ease, transform .8s var(--ease);
}
.book-modal__panel .bk { flex: 1; min-height: 0; }
.book-modal__panel:fullscreen { background: var(--navy-950); }
.book-modal__top { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); }
.book-modal__top .eyebrow { margin: 0; }
.book-modal__close {
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(201,165,92,.55); background: rgba(15,29,43,.7);
  display: grid; place-items: center; transition: background .3s, transform .4s var(--ease);
}
.book-modal__close:hover { background: var(--gold); transform: rotate(90deg); }
.book-modal__close svg { width: 20px; height: 20px; fill: none; stroke: var(--gold-light); stroke-width: 1.6; }
.book-modal__close:hover svg { stroke: var(--navy-900); }
.book-modal__hint { margin: 8px 0 0; text-align: center; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(236,214,160,.6); }

.book-modal.is-open { visibility: visible; pointer-events: auto; }
.book-modal.is-open .book-modal__backdrop { opacity: 1; }
.book-modal.is-open .book-modal__panel { opacity: 1; transform: none; transition-delay: .1s; }
.book-open { overflow: hidden; }

@media (max-width: 600px) {
  .book-fab { right: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); padding: 2px; gap: 0; }
  .book-fab__icon { width: 44px; height: 44px; }
  .book-fab__text { display: none; }
  .book-modal__hint { display: none; }
  .book-modal__close { width: 42px; height: 42px; }
}

.book-fab.is-hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }
