/* PDF Preview Grids */
.pdf-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.pdf-page-item {
    position: relative;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.pdf-page-item.selected {
    border-color: var(--primary-red);
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.5);
    transform: scale(1.02);
}

.pdf-page-item.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--primary-red);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.pdf-page-item canvas {
    display: block;
    width: 120px;
    height: auto;
    border-bottom: 1px solid #ddd;
}

.pdf-page-number {
    background: var(--text-dark);
    color: white;
    text-align: center;
    font-size: 12px;
    padding: 4px 0;
    font-weight: 600;
}

/* For Merge Drag & Drop */
.pdf-page-item.sortable-ghost {
    opacity: 0.4;
    background: #FFDFD3;
}
.pdf-page-item.draggable {
    cursor: grab;
}
.pdf-page-item.draggable:active {
    cursor: grabbing;
}
