/* Merge PDF Tool Specific Styles */

/* Merge PDF Page Specific Styles */

.merge-pdf-section {
    padding: 40px 0;
    min-height: 350px;
    background: white;
}

.merge-pdf-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.main-body .merge-pdf-section {
    padding-top: 16px;
}

/* Upload State */
.upload-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.upload-box {
    background: linear-gradient(135deg, #667eea 0%, #2563eb 100%);
    border-radius: 20px;
    padding: 20px 20px;
    text-align: center;
    color: white;
    width: 800px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-box:hover {
    transform: translateY(-5px);
    border-color: #e0e7ff;
}

.upload-box.drag-over {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #fbbf24;
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 30px;
    opacity: 0.9;
}

.upload-icon svg {
    width: 80px;
    height: 80px;
    stroke: white;
}

.upload-box h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 600;
}

.upload-box p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.upload-btn {
    background: white;
    color: #667eea;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-btn:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.upload-subtext {
    font-size: 16px;
    opacity: 0.8;
    margin: 0;
}

/* Editor State */
.editor-state {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

/* Toolbar */
.merge-toolbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.toolbar-btn.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.toolbar-btn.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.toolbar-btn.btn-success {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}

.toolbar-btn.btn-success:hover:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
}

.toolbar-btn svg {
    width: 20px;
    height: 20px;
}

.toolbar-spacer {
    flex: 1;
}

/* PDF List Container */
.pdf-list-container {
    background: #f1f5f9;
    padding: 20px;
    min-height: 400px;
    overflow: auto;
}

.pdf-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.pdf-item {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pdf-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pdf-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.pdf-icon {
    width: 48px;
    height: 48px;
    background: #ef4444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pdf-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.pdf-info {
    flex: 1;
    min-width: 0;
}

.pdf-name {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-details {
    font-size: 14px;
    color: #64748b;
    display: flex;
    gap: 16px;
}

.pdf-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pdf-item:hover .pdf-actions {
    opacity: 1;
}

.pdf-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.move-up-btn, .move-down-btn {
    background: #2563eb;
    color: white;
}

.move-up-btn:hover, .move-down-btn:hover {
    background: #1d4ed8;
}

.remove-btn {
    background: #ef4444;
    color: white;
}

.remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #475569;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Progress Bar */
.progress-container {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

/* How to Use Merge PDF Section */
.how-to-use-merge-pdf {
    padding: 40px 0;
    background: #ffffff;
}

.how-to-use-merge-pdf .section-title {
    margin-bottom: 50px;
}

.steps-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.step-card {
    flex: 1 1 220px;
    max-width: 320px;
    text-align: center;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    margin: 0 auto 16px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1e293b;
}

.step-card p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .merge-pdf-section {
        padding: 20px 0;
    }
    
    .upload-box {
        padding: 40px 20px;
        margin: 0 10px;
        width: 650px;
    }
    
    .upload-box h2 {
        font-size: 24px;
    }
    
    .upload-box p {
        font-size: 16px;
    }
    
    .merge-toolbar {
        padding: 10px;
        gap: 5px;
    }
    
    .toolbar-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .toolbar-btn span {
        display: none;
    }
    
    .pdf-list-container {
        padding: 10px;
    }
    
    .pdf-list {
        padding: 15px;
    }
    
    .pdf-item {
        padding: 12px;
        gap: 12px;
    }
    
    .pdf-icon {
        width: 40px;
        height: 40px;
    }
    
    .pdf-name {
        font-size: 14px;
    }
    
    .pdf-details {
        font-size: 12px;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .upload-box {
        padding: 30px 15px;
        width: 350px;
    }
    
    .upload-box h2 {
        font-size: 20px;
    }
    
    .merge-toolbar {
        justify-content: center;
    }
    
    .toolbar-spacer {
        display: none;
    }
    
    .pdf-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .pdf-actions {
        opacity: 1;
        justify-content: center;
    }
}
