/* ===========================
   LIBRARY.CSS
   Document Library Styling
   =========================== */

/* Document Grid */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.doc-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
}

.doc-thumb {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
}

/* Filters */
.filter-bar {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: #eee;
    cursor: pointer;
    border: 1px solid #ccc;
}

.filter-btn.active {
    background: #005bbb;
    color: white;
}

/* PDF Viewer Theme */
#previewModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 9999;
}

#previewContainer {
    width: 85%;
    height: 85%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-viewer-header {
    background: #005bbb;
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.pdf-viewer-controls button {
    background: white;
    color: #005bbb;
    border: none;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#previewFrame {
    flex: 1;
    border: none;
    width: 100%;
}
