/* PDF to JPG - minimal custom styles */
/* Most styles come from merge.css */

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.page-thumb {
    aspect-ratio: 3/4;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    overflow: hidden;
}

.page-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-thumb:hover {
    border-color: #2563eb;
}

.page-thumb.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.page-thumb.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-thumb {
    position: relative;
}

.page-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
}

@media (max-width: 640px) {
    .page-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}