/* Book Reviews Frontend Styles - Minimalist Design */

.book-reviews-container {
    margin: 30px 0;
}

/* Controls Section - Minimalist */
.book-reviews-controls {
    background: transparent;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0 20px 0;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.book-reviews-search {
    flex: 1;
    min-width: 200px;
}

.book-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 14px;
    background: white;
    transition: all 0.2s;
    color: #333;
}

.book-search-input:hover {
    border-color: #999;
    background-color: #fafafa;
}

.book-search-input:focus {
    outline: none;
    border-color: #333;
    background-color: white;
}

.book-search-input::placeholder {
    color: #999;
}

.book-reviews-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.book-filter {
    padding: 10px 36px 10px 14px;
    border: 1px solid #ddd;
    border-radius: 2px;
    background: white;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23666" d="M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.book-filter:hover {
    border-color: #999;
    background-color: #fafafa;
}

.book-filter:focus {
    outline: none;
    border-color: #333;
    background-color: white;
}

.book-reviews-view-toggle {
    display: none; /* Hidden - only grid view available */
    gap: 4px;
}

.view-toggle-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 10px 12px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-toggle-btn:hover {
    border-color: #999;
    background-color: #fafafa;
    color: #333;
}

.view-toggle-btn.active {
    background: #333;
    color: white;
    border-color: #333;
}

.view-toggle-btn.active:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.view-toggle-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Grid View - Compact & Responsive */
.book-reviews-grid.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* List View - Hidden for minimalist design */
.book-reviews-grid.view-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Book Card - Minimalist */
.book-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.book-card.hidden {
    display: none;
}

/* Book Cover - Prominent */
.book-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-cover-placeholder {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
}

.book-cover-placeholder .dashicons {
    font-size: 60px;
    color: white;
    opacity: 0.4;
}

/* Book Details - Compact Strip */
.book-details {
    padding: 12px;
    background: white;
}

.book-title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-author {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hide these elements in card view */
.book-card .book-genre,
.book-card .book-status,
.book-card .book-review,
.book-card .book-date-read {
    display: none;
}

/* Star Rating - Compact */
.book-rating {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1;
}

.book-rating .star {
    display: inline-block;
}

.book-rating .star.filled {
    color: #333;
}

.book-rating .star.empty {
    color: #e0e0e0;
}

.book-rating-none,
.panel-book-rating-none {
    font-size: 12px;
    color: #999;
}

.no-rating-text {
    font-style: italic;
}

/* Book Detail Modal */
.book-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.book-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.book-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.book-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.book-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transition: all 0.2s;
    z-index: 10;
}

.book-modal-close:hover {
    background: #333;
    color: white;
    border-color: #333;
}

.book-modal-content {
    padding: 60px 40px 40px 40px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

/* Left Column - Cover, Title, Author, Rating */
.modal-left-column {
    display: flex;
    flex-direction: column;
}

.panel-book-cover {
    width: 100%;
    max-width: 300px;
    margin: 0 0 20px 0;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #f5f5f5;
}

.panel-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-book-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.panel-book-author {
    font-size: 16px;
    color: #666;
    margin: 0 0 15px 0;
}

.panel-book-rating {
    margin: 0;
    font-size: 20px;
}

.panel-book-rating .star {
    display: inline-block;
    color: #333;
}

.panel-book-rating .star.filled {
    color: #333;
}

.panel-book-rating .star.empty {
    color: #e0e0e0;
}

/* Right Column - Meta, Review, Button */
.modal-right-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.panel-book-meta {
    margin: 0 0 30px 0;
    padding: 0 0 30px 0;
    border-bottom: 1px solid #e0e0e0;
}

.panel-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0 0 12px 0;
    font-size: 14px;
}

.panel-meta-item:last-child {
    margin: 0;
}

.panel-meta-label {
    color: #999;
    font-weight: 500;
    min-width: 120px;
}

.panel-meta-value {
    color: #333;
    text-align: right;
    flex: 1;
}

.panel-genres-item {
    align-items: center;
}

.panel-genre-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.panel-genre-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f5f5f5;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

.panel-book-review-section {
    flex: 1;
    margin: 0 0 30px 0;
}

.panel-review-heading {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 15px 0;
}

.panel-book-review {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

.panel-find-book-btn {
    display: block;
    width: 100%;
    padding: 14px 30px;
    background: #333;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #333;
    border-radius: 0;
    transition: all 0.2s;
    text-align: center;
    margin-top: auto;
}

.panel-find-book-btn:hover {
    background: white;
    color: #333;
}

/* No Results Message */
.no-books-message,
.no-results-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .book-reviews-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .book-reviews-search {
        width: 100%;
    }
    
    .book-reviews-filters {
        flex-direction: column;
    }
    
    .book-filter {
        width: 100%;
    }
    
    .book-reviews-view-toggle {
        justify-content: center;
    }
    
    .book-reviews-grid.view-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .book-modal {
        width: 95%;
        max-height: 90vh;
        max-width: 600px;
    }
    
    .book-modal-content {
        padding: 50px 30px 30px 30px;
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .book-modal-close {
        top: 15px;
        right: 15px;
    }
    
    .panel-book-cover {
        max-width: 250px;
        margin: 0 auto 20px auto;
    }
    
    .panel-book-title {
        font-size: 22px;
        text-align: center;
    }
    
    .panel-book-author {
        font-size: 16px;
        text-align: center;
    }
    
    .panel-book-rating {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .book-reviews-grid.view-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .book-title {
        font-size: 14px;
    }
    
    .book-author {
        font-size: 12px;
    }
    
    .book-rating {
        font-size: 12px;
    }
    
    .book-modal-content {
        padding: 50px 20px 25px 20px;
    }
    
    .panel-book-cover {
        max-width: 200px;
    }
    
    .panel-book-title {
        font-size: 20px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.book-card {
    animation: fadeIn 0.3s ease;
}

/* Remove unused styles */
.book-reviews-grid.view-list .book-card,
.book-reviews-grid.view-list .book-cover {
    /* Not used in minimalist design */
}
