/* ===== PREVIEW ESPECÍFICOS ===== */

/* Preview Content Base */
.preview-content {
    min-height: 400px;
}

/* ===== PREVIEW PÁGINAS (Remove, Reorder) ===== */
.pages-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.page-card {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.page-card:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.page-card.selected {
    border-color: #e74c3c;
    background: #fef2f2;
}

.page-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.page-card canvas {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-number {
    color: var(--text-color);
    font-weight: 600;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.page-checkbox {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #e74c3c;
}

/* ===== PREVIEW ARQUIVOS (Merge) ===== */
.files-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-card {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: move;
    transition: all 0.3s ease;
}

.file-card:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.file-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.file-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.file-details {
    color: var(--text-light);
    font-size: 0.85rem;
}

.file-order {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== PREVIEW DIVISÃO (Split) ===== */
.split-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.split-range-input {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.split-range-input input {
    flex: 1;
}

.split-parts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.split-part {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.split-part-preview {
    display: flex;
    gap: 0.5rem;
}

.split-page-mini {
    width: 40px;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.split-part-info {
    flex: 1;
}

.split-part-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.split-part-details {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ===== SORTABLE.JS STYLES ===== */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    transform: scale(1.02);
}