/* Total Book Shortcodes Styles */

/* Single Book Display */
.total-book-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.total-book-single .book-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.total-book-single .book-title {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 700;
}

.total-book-single .book-subtitle {
    font-size: 1.3em;
    margin: 0;
    color: #666;
    font-weight: 400;
    font-style: italic;
}

.total-book-single .book-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.total-book-single .book-meta > div {
    padding: 8px 0;
}

.total-book-single .book-description {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #555;
}

.total-book-single .book-actions {
    text-align: center;
    margin-top: 30px;
}

.total-book-single .book-view-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.total-book-single .book-view-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

/* Books List Grid */
.total-books-list {
    margin: 20px 0;
    padding: 0;
}

.books-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Column-specific grid layouts */
.books-grid.book-col-1 {
    grid-template-columns: 1fr;
}

.books-grid.book-col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.books-grid.book-col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.books-grid.book-col-4 {
    grid-template-columns: repeat(4, 1fr);
}

.books-grid.book-col-5 {
    grid-template-columns: repeat(5, 1fr);
}

.books-grid.book-col-6 {
    grid-template-columns: repeat(6, 1fr);
}

.book-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    min-width: 0;
    height: 100%;
}

.book-item:hover {
    box-shadow: 0 4px 18px rgba(0,115,170,0.13);
    transform: translateY(-2px) scale(1.02);
}

.book-item .book-cover {
    position: relative;
    height: 220px;
    background: #f0f0f0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
}

.book-item .book-cover img,
.book-item .book-cover-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-item .book-cover a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.book-item .book-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 80%, rgba(0,0,0,0.1) 100%);
    color: #fff;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 2;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.book-item .book-overlay-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
    position: relative;
    padding: 16px 12px 0 12px;
}

.book-item .book-overlay-link:hover {
    opacity: 0.9;
}

.book-item .book-overlay-link .book-author-link {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.book-item .book-title {
    font-size: 1.08em;
    font-weight: 600;
    margin-bottom: 2px;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-item .book-author {
    font-size: 0.97em;
    color: #e0e0e0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.18);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: block;
    padding: 0 12px 10px 12px;
}

.book-item .book-author-link:not(:last-child)::after {
    content: ", ";
    color: inherit;
}

.book-item .book-author-link {
    color: #cce6ff;
    text-decoration: underline;
    white-space: nowrap;
}

.book-item .book-author-link:hover {
    color: #fff;
}

.book-item .book-excerpt {
    display: none;
}

.book-item .book-actions {
    margin-top: auto;
    text-align: center;
    padding-bottom: 10px;
}

.book-item .book-view-btn {
    display: inline-block;
    padding: 7px 18px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.98em;
    transition: background 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
    margin-top: 2px;
}

.book-item .book-view-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

/* Table of Contents */
.total-book-toc {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.total-book-toc h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.4em;
}

.total-book-toc .chapter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.total-book-toc .chapter-item {
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.total-book-toc .chapter-item:last-child {
    border-bottom: none;
}

.total-book-toc .chapter-item a {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.total-book-toc .chapter-item a:hover {
    color: #0073aa;
}

.total-book-toc .chapter-number {
    font-weight: 600;
    color: #0073aa;
    margin-right: 10px;
    min-width: 25px;
}

.total-book-toc .chapter-title {
    flex-grow: 1;
}

.total-book-toc .chapter-description {
    margin-top: 5px;
    margin-left: 35px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Book Meta Display */
.total-book-meta {
    margin: 10px 0;
    font-size: 0.9em;
    color: #666;
}

.total-book-meta span {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 5px;
}

.total-book-meta strong {
    color: #333;
}

/* Error and No Results Messages */
.total-book-error,
.total-book-no-results,
.total-book-no-chapters {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
    margin: 20px 0;
}

.total-book-no-results {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.total-book-no-chapters {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .total-book-single {
        padding: 15px;
        margin: 10px;
    }
    
    .total-book-single .book-title {
        font-size: 2em;
    }
    
    .total-book-single .book-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* On mobile, override column classes to single column */
    .books-grid.book-col-2,
    .books-grid.book-col-3,
    .books-grid.book-col-4,
    .books-grid.book-col-5,
    .books-grid.book-col-6 {
        grid-template-columns: 1fr;
    }
    
    .book-item .book-info {
        padding: 15px;
    }
    
    .book-item .book-cover {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .total-book-single .book-title {
        font-size: 1.8em;
    }
    
    .total-book-single .book-subtitle {
        font-size: 1.1em;
    }
    
    .book-item .book-cover {
        height: 240px;
    }
    
    .total-book-toc {
        padding: 15px;
    }
    
    .total-book-toc .chapter-item a {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .total-book-toc .chapter-number {
        margin-bottom: 5px;
    }
}

@media (max-width: 600px) {
    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    .book-item .book-cover {
        height: 120px;
    }
    .book-item .book-info {
        padding: 8px 5px 8px 5px;
    }
}

/* Animation for loading states */
.total-book-single,
.book-item {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    .total-book-single .book-actions,
    .book-item .book-actions {
        display: none;
    }
    
    .total-book-single,
    .book-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Author Links Styling */
.book-author-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.book-author-link:hover {
    color: #005177;
    text-decoration: underline;
}

.book-author-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Multiple authors styling */
.book-author .book-author-link:not(:last-child)::after {
    content: "";
} 