.flipbook-library-search-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

#flipbook-library-search {
    padding: 10px 20px;
    width: 60%;
    max-width: 500px;
    font-size: 16px;
}

.flipbook-grid-center-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.flipbook-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1400px;
    width: 100%;
    justify-items: center;
}

.flipbook-library-item {
    display: flex;
    flex-direction: column;
    height: 100%;
   padding: 15px;
    background: #fff;
    border-radius: 10px;
}

.flipbook-library-cover {
    width: 100%;
    border: 1px solid #ddd;
    margin-bottom: 10px;border-radius: 10px !important;
}

.flipbook-library-title {
    font-weight: bold;
    margin-bottom: 10px;
    min-height: 40px; /* keeps all titles same height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.flipbook-library-btns {
    margin-top: auto; /* pushes buttons to bottom */
    display: flex;
    justify-content: center;
    gap: 10px;
}

.flipbook-btn-download
 {
padding: 12px 20px;
    background: #09243c;
    color: #fff;
    border: none;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    text-transform: uppercase;
    border-radius: 8px;
}
.flipbook-btn-view {
padding: 12px 20px;
    background: #e0b90b;
    color: #000000;
    border: none;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    text-transform: uppercase;
    border-radius: 8px;
}

#flipbook-popup-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    top: 0;
    left: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

#flipbook-popup-box {
    background: #fff;
    padding: 0px 30px;
    width: 90%;
    max-width: 900px;
    position: relative;
    overflow: hidden;
}

#flipbook-popup-close {
    position: absolute;
    right: 0px;
    top: 0px;
    background: #222;
    color: #fff;
    padding: 10px;
    cursor: pointer;
}

#flipbook-popup-content {
    width: 100%;
    height: 80vh;
    overflow: hidden;
}
