/* Carousel Button Fix - Ensures buttons are clickable and functional */

/* Ensure buttons are clickable and visible */
#bookPrev,
#bookNext {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 10 !important;
  position: relative;
  border: none;
  background: transparent;
  transition: opacity 0.3s ease;
}

#bookPrev:hover,
#bookNext:hover {
  opacity: 0.8 !important;
}

#bookPrev:active,
#bookNext:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* Ensure scroll container is scrollable */
.books-scroll {
  overflow-x: auto !important;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
}

/* Hide scrollbar for cleaner look but keep functionality */
.books-scroll::-webkit-scrollbar {
  display: none;
}

.books-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Book card styling */
.book-card {
  flex: 0 0 auto;
  min-width: 200px;
}

/* Slider controls - ensure they work */
.slider-controls {
  display: flex;
  gap: 0.5rem;
}

/* HIDE SLIDER CONTROLS ON DESKTOP */
@media (min-width: 1024px) {
  .slider-controls {
    display: none !important;
  }

  #bookPrev,
  #bookNext {
    display: none !important;
  }
}

/* SHOW SLIDER CONTROLS ON TABLET AND MOBILE */
@media (max-width: 1023px) {
  .slider-controls {
    display: flex !important;
  }

  #bookPrev,
  #bookNext {
    display: inline-block !important;
  }
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 8px;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.ctrl-btn:hover {
  background: #e8e8e8;
  opacity: 1 !important;
}

.ctrl-btn:active {
  transform: scale(0.95);
}

.ctrl-btn svg {
  width: 24px;
  height: 24px;
  stroke: #333;
}

/* Disabled state */
.ctrl-btn:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
