/* Merge PDF Specific UI */

.hidden { display: none !important; }

.mp-workspace {
    max-width: 900px !important;
}

.mp-input-section {
    margin-bottom: 30px;
}

/* Workspace Panel */
.mp-workspace-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px var(--shadow);
    animation: fadeIn 0.4s ease;
    position: relative;
    overflow: hidden;
}

.mp-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.mp-btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* File List UI */
.mp-file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar */
.mp-file-list::-webkit-scrollbar { width: 6px; }
.mp-file-list::-webkit-scrollbar-track { background: var(--bg-secondary); border-radius: 10px; }
.mp-file-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.mp-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 20px;
    transition: 0.2s;
}

.mp-file-item:hover {
    border-color: var(--primary);
}

.mp-file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
}

.mp-file-icon {
    color: #ef4444; /* PDF Red */
    font-size: 1.5rem;
}

.mp-file-name {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.mp-file-size {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.mp-file-controls {
    display: flex;
    gap: 8px;
}

.mp-ctrl-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-ctrl-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.mp-ctrl-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mp-ctrl-del:hover:not(:disabled) {
    background: #ef4444;
    border-color: #ef4444;
}

/* Action Footer */
.mp-action-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.mp-btn-danger {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    flex: 1;
}
.mp-btn-danger:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.mp-generate-btn {
    flex: 2;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
}

/* Processing Overlay */
.mp-processing-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .mp-processing-overlay {
    background: rgba(15, 23, 42, 0.85);
}

.mp-loader {
    width: 60px;
    height: 60px;
    border: 5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.mp-processing-overlay p {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Result Panel */
.mp-result-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow);
    animation: fadeIn 0.4s ease;
}

.mp-success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 20px;
}

.mp-result-panel h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
}

.mp-result-panel p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.mp-result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 300px;
    margin: 0 auto;
}

.mp-btn-success {
    background: var(--success) !important;
    justify-content: center;
}

.mp-result-actions .btn-outline {
    justify-content: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .mp-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .mp-file-name { max-width: 250px; }
    .mp-file-controls { width: 100%; justify-content: flex-end; }
    .mp-action-footer { flex-direction: column; }
}
