/* Remove PDF Pages Tool Specific Styles */

/* Remove PDF Pages Page Specific Styles */

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

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

.main-body .remove-pdf-pages-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;
    width: 100%;
    max-width: 1200px;
}

/* Toolbar */
.remove-pdf-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.btn-danger {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

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

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

.toolbar-spacer {
    flex: 1;
}

/* PDF Info */
.pdf-info {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-details {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pdf-detail-item {
    display: flex;
    flex-direction: column;
}

.pdf-detail-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 2px;
}

.pdf-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* Page Preview Container */
.page-preview-container {
    background: #f1f5f9;
    padding: 20px;
    min-height: 400px;
    overflow: auto;
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
}

.page-item {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

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

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

.page-item.to-remove {
    opacity: 0.5;
    border: 3px solid #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.page-thumbnail {
    width: 100%;
    height: 240px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.page-thumbnail canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.page-thumbnail .placeholder {
    text-align: center;
    color: #64748b;
}

.page-thumbnail .placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.page-info {
    padding: 12px;
    background: white;
}

.page-number {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.page-size {
    font-size: 12px;
    color: #64748b;
}

.page-selection {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.page-selection input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2563eb;
}

.page-item.to-remove .page-selection {
    background: #2563eb;
}

.remove-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #2563eb;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 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;
}

/* Selection Summary */
.selection-summary {
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selection-summary-text {
    font-size: 14px;
    color: #0c4a6e;
}

.selection-summary-count {
    font-weight: 600;
    color: #2563eb;
}

.clear-selection-btn {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-selection-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* How to Remove PDF Pages Section */
.how-to-remove-pdf-pages {
    padding: 40px 0;
    background: #ffffff;
}

.how-to-remove-pdf-pages .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) {
    .remove-pdf-pages-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;
    }
    
    .remove-pdf-toolbar {
        padding: 10px;
        gap: 5px;
    }
    
    .toolbar-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .toolbar-btn span {
        display: none;
    }
    
    .page-preview-container {
        padding: 10px;
    }
    
    .page-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .pdf-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .upload-box {
        padding: 30px 15px;
        width: 350px;
    }
    
    .upload-box h2 {
        font-size: 20px;
    }
    
    .remove-pdf-toolbar {
        justify-content: center;
    }
    
    .toolbar-spacer {
        display: none;
    }
    
    .page-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }
    
    .selection-summary {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
