.pdf-manager-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.pdf-manager-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pdf-manager-item h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: #333;
}

.pdf-manager-actions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pdf-manager-button {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.pdf-manager-view {
    background-color: #0073aa;
}

.pdf-manager-view:hover {
    background-color: #005177;
}

.pdf-manager-download {
    background-color: #28a745;
}

.pdf-manager-download:hover {
    background-color: #218838;
}

/* Popup Viewer */
.pdf-manager-popup {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.pdf-manager-popup.active {
    display: flex;
}

.pdf-manager-popup-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
}

.pdf-manager-close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.pdf-manager-close-button:hover,
.pdf-manager-close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#pdf-viewer {
    margin-top: 30px;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pdf-viewer canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}
