.book-search { position: relative; padding: 16px 0; }
.book-search:not([hidden]) + .book-modules-tab-content { padding-top: 0; }
.book-search .form-control {
    padding: .51rem .75rem .51rem 40px;
    font-size: .9rem;
    background: #f5f7fa;
    border: none;
    border-radius: 10px;
}
.book-search .form-control:focus,
.book-search .form-control:focus-visible { box-shadow: none; }
.book-search-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}
[data-book-search-root] [hidden] { display: none !important; }
.book-search-active .accordion-collapse {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important;
    transition: none !important;
}

.book-search-input { position: relative; }
.book-pages {
    margin-top: 12px;
}
.book-pages-label { margin-bottom: 5px; color: #8a919b; font-size: 12px; }
.book-pages-surface {
    position: relative;
    border-radius: 10px;
    background: #f5f7fa;
    overflow: hidden;
}
.book-pages-track {
    position: relative;
    display: flex;
    align-items: center;
    height: 38px;
    padding-left: calc(50% - var(--first-page-width, 48px) / 2);
    padding-right: calc(50% - var(--last-page-width, 48px) / 2);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    touch-action: pan-y pinch-zoom;
}
.book-pages-surface::before {
    content: '';
    position: absolute;
    inset-block: 0;
    left: 50%;
    width: var(--center-page-width, 48px);
    transform: translateX(-50%);
    background: #e3edfb;
    pointer-events: none;
}
.book-pages-track { cursor: grab; user-select: none; }
.book-pages-track.is-wheeling,
.book-pages-track.is-dragging { scroll-snap-type: none; }
.book-pages-track.is-dragging { cursor: grabbing; }
.book-pages-track.is-dragging .book-page { cursor: grabbing; }
.book-pages-track::-webkit-scrollbar { display: none; }
.book-page {
    flex: 0 0 auto;
    width: max-content;
    height: 100%;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #576579;
    font-size: 80%;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: center;
    transform: scale(var(--page-scale, 1));
    opacity: var(--page-opacity, 1);
}
.book-page:focus-visible { outline: 2px solid #245ca6; outline-offset: -3px; }
