/* Frontend Styles for PDF Books Lister */
.year-heading{font-size:20px;}
.pdf-books-lister-wrapper {
    margin-top: 20px;
    margin-bottom: 20px;
}

.pdf-books-grid {
    display: grid;
    gap: 20px; /* Space between books */
    list-style: none; /* Remove list styling if used */
    padding: 0;
    margin: 0;
}

/* Mobile: 2 columns */
@media (max-width: 767px) {
    .pdf-books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 4 columns */
@media (min-width: 768px) {
    .pdf-books-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pdf-book-item {
    padding: 15px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes buttons to the bottom */
}

.book-thumbnail img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 15px;
    box-shadow: 2px 2px 2px #ccc;
}

.book-title {
    font-size: 1em;
    margin-top: 0;
    margin-bottom:8px;
}

.book-title a {
    text-decoration: none;
    color: #333;
}

.book-title a:hover {
    color: #0073aa; /* WordPress default blue */
}

.book-isbn {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.book-actions {
    display: flex;
    margin-top: auto; /* Pushes buttons to the bottom */
    justify-content:space-between;
    gap: 10px; /* Space between buttons */
}

.book-actions .button {
    display: inline-block;
    padding:5px;
    text-decoration: none;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}
.book-actions .button:hover {
    opacity:0.6;
    color: #fff; /* Keep text white on hover */
}
.book-actions .df-popup-button{
    background: none;
    padding:5px;
}
.book-actions .df-popup-button:hover{
    opacity:0.6;
}

/* Pagination Styles */
.pdf-books-pagination {
    margin-top: 30px;
    text-align: center;
}

.pdf-books-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #0073aa;
    border-radius: 3px;
}

.pdf-books-pagination .page-numbers.current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.pdf-books-pagination .page-numbers:hover:not(.current) {
    background-color: #f0f0f0;
}
.book-short-description {
    padding:0;margin:0;
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis; /* Adds "..." if text overflows */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
}

.latest-books-heading {
    text-align: center;
    font-size: 2em;
    color: #0056b3; /* A different color for the latest books heading */
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}
.book-volume {
    font-size: 80%;
    margin-bottom:3px;
    color:#555;
}