@CHARSET "UTF-8";

/* ========================================
   BOOK DETAILS PAGE - INLINE STYLES
   ======================================== */

.book-details-container {
    max-width: 1200px !important;
    margin: 0 auto;
    padding: 30px 15px 60px;
}

/* Loading */
.book-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #666;
}

.book-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #054A49;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error */
.book-error {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.book-error i {
    font-size: 64px;
    color: #dc3545;
    margin-bottom: 20px;
    display: block;
}

.book-error h3 {
    margin-bottom: 15px;
    color: #333;
}

.btn-back-catalog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 24px;
    background: #054A49;
    color: #fff !important;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back-catalog:hover {
    background: #033534;
    color: #fff;
}

/* ========================================
   HEADER SECTION
   ======================================== */
.book-header {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    margin-top: 20px;
}

/* Cover */
.book-cover-wrapper {
    text-align: center;
}

.book-cover-large {
    width: 100%;
    max-width: 220px;
    height: 320px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #054A49 0%, #033534 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.book-cover-large img.hidden {
    display: none;
}

.book-cover-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 20px;
}

.book-cover-fallback i {
    font-size: 64px;
    margin-bottom: 15px;
}

.book-cover-fallback .fallback-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    max-height: 60px;
    overflow: hidden;
}

.book-cover-fallback .fallback-author {
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.8;
}

/* Badges */
.availability-badge {
    margin-top: 15px;
    text-align: center;
}

.badge-available,
.badge-unavailable {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

.badge-available {
    background: #d4edda;
    color: #155724;
}

.badge-unavailable {
    background: #f8d7da;
    color: #721c24;
}

/* Popularity */
.popularity-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

/* Main Info */
.book-main-info {
    padding-left: 20px;
}

.book-title {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    margin: 0 0 15px;
    line-height: 1.3;
}

/* Authors */
.book-authors {
    margin-bottom: 15px;
}

.author-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #054A49;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.author-link:hover {
    color: #033534;
    text-decoration: underline;
}

.author-separator {
    color: #999;
    margin: 0 8px;
}

.no-author {
    color: #999;
    font-style: italic;
}

/* Material Type */
.book-type-badge {
    margin-bottom: 20px;
}

.material-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #e8f4fc;
    color: #0077b6;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Key Info */
.book-key-info {
    background: #f8faf9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.info-row {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row:first-child {
    padding-top: 0;
}

.info-label {
    flex: 0 0 200px;
    color: #666;
    font-weight: 600;
    font-size: 14px;
}

.info-label i {
    color: #054A49;
    width: 20px;
    margin-right: 8px;
}

.info-value {
    flex: 1;
    color: #333;
    font-weight: 500;
}

/* Action Buttons */
.book-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #fff;
    color: #054A49 !important;
    border: 2px solid #054A49;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary-action:hover {
    background: #054A49;
    color: #fff !important;
}

/* ========================================
   TABS SECTION
   ======================================== */
.book-tabs-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.book-nav-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    background: #f8f9fa;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-x: auto;
}

.book-nav-tabs .nav-item {
    flex-shrink: 0;
}

.book-nav-tabs .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 24px;
    color: #666;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.book-nav-tabs .nav-link:hover {
    color: #054A49;
    background: rgba(5,74,73,0.05);
}

.book-nav-tabs .nav-link.active {
    color: #054A49;
    border-bottom-color: #054A49;
    background: #fff;
}

.holdings-count {
    background: #054A49;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.tab-inner-content {
    padding: 30px;
}

/* Tab Panes */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Description */
.book-abstract {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.book-abstract .no-content {
    color: #999;
    font-style: italic;
}

.book-abstract .no-content i {
    margin-right: 8px;
}

/* Notes */
.notes-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.notes-section h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.notes-section h4 i {
    color: #054A49;
    margin-right: 10px;
}

.note-item {
    padding: 12px 16px;
    background: #f8f9fa;
    border-left: 4px solid #054A49;
    border-radius: 0 8px 8px 0;
    margin-bottom: 10px;
    font-size: 15px;
    color: #555;
}

/* Details Table */
.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th,
.details-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
    vertical-align: top;
}

.details-table th {
    width: 220px;
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.details-table td {
    color: #333;
    font-size: 15px;
}

.details-table tr:hover td,
.details-table tr:hover th {
    background: #f0f7f6;
}

/* Holdings */
.holdings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.holdings-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.holdings-header h4 i {
    color: #054A49;
    margin-right: 10px;
}

.holdings-legend {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.available { background: #28a745; }
.status-dot.on-loan { background: #dc3545; }

.holdings-table-wrapper {
    overflow-x: auto;
}

.holdings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.holdings-table th,
.holdings-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.holdings-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #555;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.holdings-table th i {
    margin-right: 6px;
    color: #054A49;
}

.holdings-table td {
    font-size: 14px;
    color: #333;
}

.holdings-table td i {
    color: #054A49;
    margin-right: 6px;
}

.holdings-table td code {
    background: #f1f3f4;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.holdings-table tbody tr:hover td {
    background: #f8faf9;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge.status-available {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-on-loan {
    background: #f8d7da;
    color: #721c24;
}

.no-holdings {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-holdings i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

/* Subjects */
.subjects-section h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.subjects-section h4 i {
    color: #054A49;
    margin-right: 10px;
}

.subjects-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.subject-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #e8f4fc 0%, #d4edda 100%);
    color: #0077b6;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.subject-tag i {
    font-size: 12px;
}

.subject-tag:hover {
    background: linear-gradient(135deg, #054A49 0%, #033534 100%);
    color: #fff;
    transform: translateY(-2px);
}

.no-subjects {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

/* ========================================
   RELATED BOOKS
   ======================================== */
.related-books-section,
.same-author-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.section-header h3 i {
    color: #054A49;
    margin-right: 12px;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #054A49;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.view-all-link:hover {
    color: #033534;
}

.related-books-grid,
.same-author-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-book-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.related-book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #054A49;
}

.related-book-card a {
    text-decoration: none;
    color: inherit;
}

.related-book-cover {
    height: 180px;
    background: linear-gradient(135deg, #054A49 0%, #033534 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.related-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.related-book-cover img.hidden {
    display: none;
}

.related-book-cover .cover-fallback {
    color: rgba(255,255,255,0.6);
    font-size: 48px;
}

.related-book-info {
    padding: 15px;
}

.related-book-info h5 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.related-book-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    .book-main-info {
        padding-left: 0;
        margin-top: 30px;
    }
    
    .book-cover-large {
        max-width: 180px;
        height: 260px;
    }
    
    .book-title {
        font-size: 24px;
    }
    
    .info-label {
        flex: 0 0 160px;
    }
    
    .related-books-grid,
    .same-author-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .book-header {
        padding: 20px;
    }
    
    .book-title {
        font-size: 20px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-label {
        flex: none;
    }
    
    .book-action-buttons {
        flex-direction: column;
    }
    
    .btn-secondary-action {
        width: 100%;
        justify-content: center;
    }
    
    .tab-inner-content {
        padding: 20px;
    }
    
    .book-nav-tabs .nav-link {
        padding: 14px 16px;
        font-size: 13px;
    }
    
    .related-books-grid,
    .same-author-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .details-table th {
        width: 130px;
    }
}

@media (max-width: 480px) {
    .related-books-grid,
    .same-author-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}
.facet-hidden {
    display: none !important;
}

.facet-more-btn {
    color: #007bff;
    font-size: 12px;
    cursor: pointer;
    display: block !important;
    margin-top: 4px;
}