/* PDF Merger Pro — iLovePDF-style merge tool */

.pmp-wrapper {
    --pmp-red: #e5322d;
    --pmp-red-dark: #c9241f;
    --pmp-ink: #2c3e50;
    --pmp-muted: #7c8b9b;
    --pmp-border: #e3e8ee;
    --pmp-bg: #f6f8fa;
    --pmp-radius: 10px;

    max-width: 780px;
    margin: 0 auto;
    padding: 40px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--pmp-ink);
    box-sizing: border-box;
}

.pmp-wrapper *,
.pmp-wrapper *::before,
.pmp-wrapper *::after {
    box-sizing: border-box;
}

.pmp-hidden {
    display: none !important;
}

/* Header */
.pmp-header {
    text-align: center;
    margin-bottom: 28px;
}

.pmp-title {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--pmp-ink);
}

.pmp-subtitle {
    font-size: 15px;
    color: var(--pmp-muted);
    margin: 0;
}

/* Dropzone */
.pmp-dropzone {
    border: 2px dashed var(--pmp-red);
    border-radius: var(--pmp-radius);
    background: #fff9f8;
    padding: 56px 24px;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.pmp-dropzone:hover,
.pmp-dropzone:focus-visible,
.pmp-dropzone.pmp-dragover {
    background: #fdeeed;
    border-color: var(--pmp-red-dark);
    outline: none;
}

.pmp-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.pmp-icon-upload {
    color: var(--pmp-red);
}

.pmp-dropzone-hint {
    margin: 0;
    color: var(--pmp-muted);
    font-size: 14px;
}

/* Buttons */
.pmp-wrapper a,
.pmp-btn,
.pmp-btn:hover,
.pmp-btn:focus,
.pmp-btn:active,
.pmp-btn:visited {
    text-decoration: none !important;
}

.pmp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color .15s ease, transform .05s ease;
}

.pmp-btn:active {
    transform: translateY(1px);
}

.pmp-btn-primary {
    background: var(--pmp-red);
    color: #fff;
    padding: 13px 28px;
    font-size: 16px;
}

.pmp-btn-primary:hover,
.pmp-btn-primary:focus,
.pmp-btn-primary:visited {
    background: var(--pmp-red-dark);
    color: #fff;
}

.pmp-btn-large {
    padding: 15px 40px;
    font-size: 17px;
    width: 100%;
    max-width: 320px;
}

.pmp-link-btn {
    background: none;
    border: none;
    color: var(--pmp-red);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 4px;
    text-decoration: none !important;
}

/* File list toolbar */
.pmp-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pmp-file-count {
    font-weight: 600;
    color: var(--pmp-ink);
    font-size: 14px;
}

/* File list */
.pmp-file-list {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    border: 1px solid var(--pmp-border);
    border-radius: var(--pmp-radius);
    overflow: hidden;
    background: #fff;
}

.pmp-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--pmp-border);
    background: #fff;
    cursor: grab;
    overflow: hidden;
    max-width: 100%;
}

.pmp-file-item:last-child {
    border-bottom: none;
}

.pmp-file-item.pmp-drag-ghost {
    opacity: 0.4;
}

.pmp-file-drag-handle {
    color: #c3ccd6;
    flex: 0 0 auto;
    font-size: 16px;
    line-height: 1;
    user-select: none;
}

.pmp-file-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #fdeeed;
    color: var(--pmp-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.pmp-file-meta {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.pmp-file-name {
    display: block;
    max-width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: var(--pmp-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pmp-file-size {
    display: block;
    max-width: 100%;
    font-size: 12px;
    color: var(--pmp-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pmp-file-position {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--pmp-bg);
    color: var(--pmp-muted);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pmp-file-remove {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: var(--pmp-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
}

.pmp-file-remove:hover {
    color: var(--pmp-red);
    background: #fdeeed;
}

.pmp-reorder-hint {
    font-size: 13px;
    color: var(--pmp-muted);
    margin: 0 0 20px;
}

.pmp-error {
    color: var(--pmp-red-dark);
    background: #fdeeed;
    border: 1px solid #f6c6c4;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.pmp-error.pmp-visible {
    display: block;
}

.pmp-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* Processing */
.pmp-processing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 70px 24px;
}

.pmp-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid var(--pmp-border);
    border-top-color: var(--pmp-red);
    border-radius: 50%;
    animation: pmp-spin 0.8s linear infinite;
}

@keyframes pmp-spin {
    to { transform: rotate(360deg); }
}

.pmp-processing p {
    font-size: 15px;
    color: var(--pmp-muted);
    margin: 0;
}

/* Done */
.pmp-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 50px 24px;
}

.pmp-icon-check {
    color: #2ea043;
    margin-bottom: 8px;
}

.pmp-done h3 {
    margin: 0;
    font-size: 22px;
}

.pmp-done-meta {
    color: var(--pmp-muted);
    font-size: 14px;
    margin: 0 0 18px;
}

/* Privacy note */
.pmp-privacy-note {
    text-align: center;
    font-size: 13px;
    color: var(--pmp-muted);
    margin-top: 28px;
}

/* Responsive */
@media (max-width: 480px) {
    .pmp-title {
        font-size: 24px;
    }

    .pmp-dropzone {
        padding: 40px 16px;
    }

    .pmp-btn-large {
        max-width: 100%;
    }

    .pmp-file-item {
        gap: 8px;
        padding: 10px;
    }

    .pmp-file-drag-handle {
        font-size: 13px;
    }

    .pmp-file-icon {
        width: 28px;
        height: 28px;
        font-size: 9px;
    }

    .pmp-file-position {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .pmp-file-name {
        font-size: 13px;
    }
}
