/* Flipbook Código de Conduta — desktop Turn.js */
#flipbookModal {
  z-index: 1100 !important;
}
#flipbookModal .modal-dialog {
  pointer-events: auto;
}
#flipbookModal .modal-content {
  pointer-events: auto;
  background: #fff;
  overflow: visible !important;
}
#flipbookModal .modal-body {
  position: relative;
  background: #f3f3f3;
  overflow: visible !important;
  padding-bottom: 0 !important;
}

#book-viewport {
  position: relative;
  margin: 12px auto 8px;
  background: #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  overflow: visible !important;
  z-index: 2;
}

#flipbook {
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

/* NÃO forçar width/height — o Turn.js define via style inline */
#flipbook .page {
  background: #fff;
  float: none;
  border: none;
}

#flipbook .page img,
#flipbook .turn-page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 8px;
  background: #fff;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.flipbook-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px 16px;
  background: #fff;
  position: relative;
  z-index: 5;
}
.flipbook-nav button {
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  background: #1876D2;
  color: #fff;
  cursor: pointer;
  min-width: 120px;
}
.flipbook-nav button:disabled {
  opacity: 0.45;
  cursor: default;
}
.flipbook-nav button:hover:not(:disabled) {
  background: #125ea8;
}
.flipbook-nav .flipbook-page-label {
  font-size: 0.95rem;
  color: #333;
  min-width: 110px;
  text-align: center;
}

body.modal-open .modal-backdrop {
  z-index: 1090 !important;
}
body.modal-open #flipbookModal {
  z-index: 1100 !important;
}

@media (max-width: 768px) {
  .flipbook-nav {
    position: sticky;
    bottom: 0;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  }
}
