/**
 * Benha PDF Flipbook styles.
 */

.flipbook-wrapper {
  position: relative;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.flipbook-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
}

.flipbook-book {
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
  width: 100%;
}

.flipbook-page {
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  position: relative;
}

.flipbook-page canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.flipbook-page-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flipbook-page-number {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: #666;
}

/* Even and odd pages with gradients for book effect */
.flipbook-page:nth-child(even) {
  background: linear-gradient(to right, #f8f8f8 0%, #ffffff 5%);
}

.flipbook-page:nth-child(odd) {
  background: linear-gradient(to left, #f8f8f8 0%, #ffffff 5%);
}

.flipbook-controls {
  text-align: center;
  margin-top: 30px;
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
}

.flipbook-controls button {
  background: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.flipbook-controls button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: #f0f0f0;
}

.flipbook-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.flipbook-page-info {
  color: white;
  font-size: 18px;
  font-weight: bold;
  padding: 0 20px;
}

.flipbook-loading {
  text-align: center;
  color: white;
  font-size: 24px;
  padding: 50px;
}

.flipbook-error {
  color: #ff6b6b;
}

.flipbook-instructions {
  text-align: center;
  color: white;
  margin-top: 20px;
  font-size: 14px;
  opacity: 0.8;
}

/* Mobile: < 1200px - Single page mode */
@media (max-width: 1199px) {
  .flipbook-wrapper {
    padding: 10px;
  }

  .flipbook-controls {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .flipbook-controls button {
    padding: 10px 20px;
    font-size: 14px;
  }

  .flipbook-page-info {
    font-size: 14px;
    width: 100%;
    order: -1;
  }
}
