/* 书单管理模块样式 */

.book-list-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 拖拽排序视觉提示 */
.book-list-col.dragging {
    opacity: 0.7;
}
.book-list-col.drag-over {
    outline: 2px dashed #0d6efd;
}
.book-list-card .card-header {
    cursor: pointer;
}

.book-list-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

/* 紧凑布局微调 */
.book-list-card .card-header,
.book-list-card .card-footer {
    padding: 8px 12px;
}

.book-list-card .card-body {
    padding: 12px;
}

.book-preview {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
}

.book-item-mini {
    display: flex;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid #e9ecef;
}

.book-item-mini:last-child {
    border-bottom: none;
}

.book-item-mini .book-title {
    font-size: 0.875rem;
    color: #495057;
    margin-left: 4px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-list-stats {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
}

.book-list-stats .stat-value {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
}

.book-list-stats .stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 2px;
}

/* 书单创建/编辑表单 */
.book-selection-area {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.available-books,
.selected-books {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    padding: 12px;
}

.book-item {
    padding: 12px;
    border-bottom: 1px solid #f1f3f4;
    margin-bottom: 8px;
    border-radius: 6px;
    background-color: #fff;
    transition: background-color 0.2s ease;
}

.book-item:hover {
    background-color: #f8f9fa;
}

.book-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.selected-book-item {
    padding: 12px;
    border: 1px solid #28a745;
    background-color: #d4edda;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.selected-book-item:last-child {
    margin-bottom: 0;
}

.empty-selected {
    border: 2px dashed #dee2e6;
    background-color: #f8f9fa;
    border-radius: 6px;
    color: #6c757d;
}

/* 书单预览 */
.book-list-preview-modal .modal-dialog {
    max-width: 800px;
}

.preview-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

.preview-book-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    background-color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preview-book-cover {
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.preview-book-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #212529;
    margin-bottom: 4px;
    line-height: 1.3;
}

.preview-book-author {
    font-size: 0.75rem;
    color: #6c757d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .book-selection-area .row > .col-md-6 {
        margin-bottom: 20px;
    }
    
    .book-list-card {
        margin-bottom: 20px;
    }
    
    .preview-book-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
}

/* 书单状态标识 */
.book-list-card.status-hidden {
    opacity: 0.7;
}

.book-list-card.status-hidden .card-header {
    background: linear-gradient(135deg, #f1f3f4 0%, #e9ecef 100%);
}

.book-list-card.status-invalid {
    border-color: #dc3545;
}

.book-list-card.status-invalid .card-header {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* 加载状态 */
.book-selection-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
}

.book-selection-loading .spinner-border {
    margin-right: 12px;
}

/* 书单统计 */
.book-list-stats-summary {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.book-list-stats-summary .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    text-align: center;
}

.book-list-stats-summary .stat-item {
    color: #1976d2;
}

.book-list-stats-summary .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.book-list-stats-summary .stat-text {
    font-size: 0.875rem;
    margin-top: 4px;
}
