/* ============================================
   Shared styles for library-catalog pages
   ============================================ */

/* --- index.php: Catalog Stats Bar --- */
#catalog-stats { background:#333; color:#fefefe; padding:8px 0; text-align:center; font-size:13px; }
#catalog-stats span { margin:0 12px; }
#catalog-stats b { color:#fff; }

/* --- index.php: Content Area --- */
#catalog-content { padding:20px 0 40px 0; }

/* --- index.php: Filter Bar --- */
.filter-bar { background:#f3f3f3; padding:15px 20px; margin-bottom:20px; border-radius:3px; }
.filter-bar .form-control { font-size:13px; height:34px; }
.filter-bar .form-group { margin-bottom:8px; margin-right:10px; display:inline-block; vertical-align:top; }
.filter-bar label { font-size:11px; font-weight:bold; text-transform:uppercase; color:#666; display:block; margin-bottom:3px; }
.filter-bar .btn-search { background:#9b1312; color:white; font-weight:bold; border:none; height:34px; padding:0 20px; text-transform:uppercase; }
.filter-bar .btn-search:hover { background:#aa1413; }

/* --- index.php: Filter Pills --- */
.filter-pills { margin-bottom:15px; }
.filter-pills a { display:inline-block; padding:6px 16px; margin:0 3px 5px 0; border-radius:15px; font-size:12px; text-decoration:none; color:#666; background:white; border:1px solid #ccc; }
.filter-pills a:hover { border-color:#9b1312; color:#9b1312; }
.filter-pills a.active { background:#9b1312; color:white; border-color:#9b1312; }

/* --- index.php: Result Info --- */
.result-info { font-size:12px; color:#888; margin-bottom:15px; }

/* --- index.php: Book Items --- */
.book-item { background:white; margin-bottom:12px; overflow:hidden; border-radius:3px; border:1px solid #ddd; transition:border-color 0.2s; }
.book-item:hover { border-color:#9b1312; }
.book-item.has-desc { border-left:3px solid #2e7d32; }
.book-item.has-notes { border-left:3px solid #9b1312; }
.book-item.on-loan { opacity:0.85; }

.book-item-inner { padding:14px 18px; }

.book-item .book-title { color:#9b1312; font-weight:bold; font-size:15px; margin-bottom:2px; }
.book-item .book-title a { color:#9b1312; text-decoration:none; }

.book-item .book-author { font-weight:bold; font-size:13px; color:#333; margin-bottom:4px; }
.book-item .book-publisher { font-size:12px; color:#888; }
.book-item .book-isbn { font-size:12px; color:#999; }

.book-item .book-category-badge { display:inline-block; font-size:10px; padding:1px 8px; border-radius:3px; background:#9b1312; color:white; font-weight:bold; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:5px; }

.book-item .avail-badge { display:inline-block; font-size:10px; padding:1px 8px; border-radius:3px; font-weight:bold; margin-left:6px; }
.avail-badge.available { background:#e8f5e9; color:#2e7d32; }
.avail-badge.on-loan { background:#fbe9e7; color:#c62828; }

.book-item .book-desc-text { font-size:13px; color:#444; line-height:1.6; margin:8px 0; padding:8px 12px; background:#fafafa; border-left:2px solid #9b1312; border-radius:2px; }
.book-item .book-desc-text.collapsed { max-height:60px; overflow:hidden; position:relative; }
.book-item .book-desc-text.collapsed::after { content:''; position:absolute; bottom:0; left:0; right:0; height:30px; background:linear-gradient(transparent, #fafafa); }
.book-item .expand-btn { font-size:11px; color:#9b1312; cursor:pointer; background:none; border:none; padding:0; font-weight:bold; }
.book-item .expand-btn:hover { text-decoration:underline; }

.book-item .book-tags { margin-top:6px; }
.book-item .book-tags .label { font-size:10px; font-weight:normal; margin-right:4px; margin-bottom:3px; display:inline-block; padding:2px 8px; }
.label-category { background:#9b1312; }
.label-gmd { background:#5e35b1; }
.label-lang { background:#2e7d32; }
.label-ddc { background:#e65100; }
.label-subject { background:#795548; }
.label-pages { background:#607d8b; }

.book-item .book-copies { font-size:11px; color:#999; margin-top:4px; }

/* --- index.php: Pagination --- */
.catalog-pagination { text-align:center; margin-top:20px; }
.catalog-pagination a, .catalog-pagination span { display:inline-block; padding:5px 11px; margin:0 2px; font-size:13px; text-decoration:none; border-radius:3px; }
.catalog-pagination a { background:white; color:#666; border:1px solid #ddd; }
.catalog-pagination a:hover { border-color:#9b1312; color:#9b1312; }
.catalog-pagination span.current { background:#9b1312; color:white; border:1px solid #9b1312; }
.catalog-pagination span.dots { color:#999; border:none; }

/* --- index.php: No Results --- */
.no-results { text-align:center; padding:60px 20px; color:#888; }
.no-results h3 { color:#333; margin-bottom:8px; }

/* --- recommended.php: Page Header Bar --- */
.page-header-bar { background:#333; color:#fefefe; padding:12px 0; text-align:center; }
.page-header-bar h2 { margin:0; font-size:18px; font-weight:bold; }
.page-header-bar p { margin:4px 0 0; font-size:12px; color:#aaa; }

/* --- recommended.php: Week Navigation --- */
.week-nav { background:#f3f3f3; padding:10px 20px; text-align:center; margin-bottom:20px; border-radius:3px; }
.week-nav a { display:inline-block; width:28px; height:28px; line-height:28px; text-align:center; margin:2px 1px;
    font-size:11px; text-decoration:none; border-radius:50%; color:#666; background:white; border:1px solid #ddd; }
.week-nav a:hover { border-color:#9b1312; color:#9b1312; }
.week-nav a.current { background:#9b1312; color:white; border-color:#9b1312; }

/* --- recommended.php: Season & Week Cards --- */
.season-header { padding:12px 20px; margin:30px 0 15px; border-radius:3px; color:white; font-weight:bold; font-size:15px; }
.season-header:first-child { margin-top:0; }

.week-card { background:white; border:1px solid #ddd; border-radius:4px; margin-bottom:20px; overflow:hidden; transition:border-color 0.2s; }
.week-card:hover { border-color:#9b1312; }
.week-card-header { padding:14px 20px; border-bottom:1px solid #eee; }
.week-card-header h3 { margin:0; font-size:16px; color:#333; }
.week-card-header h3 .week-num { display:inline-block; background:#9b1312; color:white; font-size:11px; padding:2px 8px; border-radius:10px; margin-right:8px; vertical-align:middle; }
.week-card-header .week-theme { font-size:12px; color:#888; margin-top:4px; font-style:italic; }

.week-books { padding:0; margin:0; list-style:none; }
.week-books li { padding:12px 20px; border-bottom:1px solid #f5f5f5; display:flex; align-items:flex-start; gap:12px; }
.week-books li:last-child { border-bottom:none; }
.book-number { flex-shrink:0; width:24px; height:24px; line-height:24px; text-align:center; border-radius:50%; background:#f3f3f3; color:#666; font-size:11px; font-weight:bold; }
.book-detail { flex:1; min-width:0; }
.book-detail .book-title { font-weight:bold; color:#9b1312; font-size:14px; }
.book-detail .book-title a { color:#9b1312; text-decoration:none; }
.book-detail .book-title a:hover { text-decoration:underline; }
.book-detail .book-author { font-size:12px; color:#666; margin-top:2px; }
.book-detail .book-desc { font-size:12px; color:#888; margin-top:4px; line-height:1.5; }

.highlight { border-color:#9b1312 !important; box-shadow:0 0 0 2px rgba(155,19,18,0.15); }

.back-link { display:inline-block; margin-bottom:15px; font-size:13px; color:#9b1312; text-decoration:none; }
.back-link:hover { text-decoration:underline; }

/* --- Responsive --- */
@media (max-width:767px) {
    /* index.php */
    .filter-bar { padding:12px 15px; }
    .filter-bar .form-group { display:block; margin-right:0; margin-bottom:10px; }
    .filter-bar .form-group[style*="min-width"] { min-width:0 !important; }
    .filter-bar .form-control { width:100%; }
    .filter-bar .btn-search { width:100%; }
    .filter-pills { display:flex; flex-wrap:wrap; gap:4px; padding:0 1rem; }
    .filter-pills a { margin:0; font-size:11px; padding:4px 10px; }
    .result-info { padding:0 1rem; }
    .filter-pills span { display:none; }
    #catalog-stats { font-size:11px; }
    #catalog-stats span { margin:0 6px; }
    .book-item-inner { padding:10px 14px; }
    .book-item .book-title { font-size:14px; }

    /* recommended.php */
    .week-nav a { width:24px; height:24px; line-height:24px; font-size:10px; margin:1px; }
    .week-card-header { padding:10px 14px; }
    .week-card-header h3 { font-size:14px; }
    .week-books li { padding:10px 14px; }
    .book-detail .book-title { font-size:13px; }
    .page-header-bar h2 { font-size:16px; }
}
