/* ==========================================================================
   Library - Library Modal, Book List
   ========================================================================== */

/* Library overlay (legacy) and library view (router) */
.library-overlay, .library-view {
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.library-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.library-overlay.hidden, .library-view.hidden {
    display: none;
}

.library-content {
    background: #16213e;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.library-view {
    flex: 1;
    background: #1a1a2e;
    z-index: 1;
}

.library-view .library-content {
    width: 100%;
    max-width: 1000px;
    max-height: none;
    height: 100%;
    border-radius: 0;
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #0f3460;
}

.library-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.library-upload-btn {
    background: #0f3460;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.library-upload-btn:hover {
    background: #1a4a7a;
}

.library-header h2 {
    color: #e94560;
    font-size: 20px;
}

.library-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.library-close-btn:hover {
    color: #e94560;
}

.library-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.library-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

.library-book {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #1a1a2e;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.library-book:hover {
    background: #222233;
}

.library-book-info h3 {
    color: #eee;
    font-size: 16px;
    margin-bottom: 4px;
}

.library-book-info p {
    color: #888;
    font-size: 13px;
}

.library-book-actions {
    display: flex;
    gap: 8px;
}

.library-book-btn {
    background: #0f3460;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.library-book-btn:hover {
    background: #1a4a7a;
}

.library-book-btn.danger {
    background: #6b2a39;
}

.library-book-btn.danger:hover {
    background: #8a3a4a;
}
