.merge-page {
    padding: 54px 0 90px;
}

.merge-title {
    max-width: 760px;
    margin-bottom: 32px;
}

.merge-title h1 {
    margin: 0;

    font-size: 42px;
    line-height: 1.15;

    letter-spacing: -1.5px;
}

.merge-title p {
    margin: 16px 0 0;

    color: #6c7178;

    font-size: 16px;
    line-height: 1.75;
}


/* Upload */

.upload-area {
    min-height: 410px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 45px 25px;

    background: #ffffff;

    border: 2px dashed #d4d8de;
    border-radius: 22px;

    text-align: center;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.upload-area.drag-over {
    border-color: #202124;
    background: #f4f5f7;
}

.upload-icon {
    width: 76px;
    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 22px;

    background: #f1f3f4;

    color: #202124;

    font-size: 36px;
    line-height: 1;
}

.upload-area h2 {
    margin: 0;

    font-size: 23px;
}

.upload-area p {
    margin: 11px 0 24px;

    color: #777c84;

    font-size: 14px;
}

.primary-btn,
.secondary-btn,
.merge-btn {
    border: 0;

    cursor: pointer;

    font-family: inherit;
    font-weight: 700;
}

.primary-btn {
    padding: 13px 24px;

    border-radius: 11px;

    background: #202124;
    color: #ffffff;

    font-size: 15px;
}

.primary-btn:hover {
    background: #000000;
}


/* Workspace */

.merge-workspace {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e2e5e9;
    border-radius: 20px;
}

.workspace-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 24px;

    border-bottom: 1px solid #eceef1;
}

.workspace-top h2 {
    margin: 0;

    font-size: 20px;
}

.workspace-top p {
    margin: 5px 0 0;

    color: #858a91;

    font-size: 13px;
}

.secondary-btn {
    padding: 10px 15px;

    border: 1px solid #d8dce1;
    border-radius: 9px;

    background: #ffffff;
    color: #34373b;

    font-size: 13px;
}

.secondary-btn:hover {
    background: #f4f5f6;
}


/* PDF cards */

.file-list {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(190px, 1fr));

    gap: 18px;

    padding: 24px;

    min-height: 260px;

    background: #f7f8fa;
}

.pdf-card {
    position: relative;

    min-width: 0;

    padding: 12px;

    background: #ffffff;

    border: 1px solid #e0e3e7;
    border-radius: 14px;

    cursor: grab;

    box-shadow:
        0 2px 5px
        rgba(0, 0, 0, 0.025);
}

.pdf-card:active {
    cursor: grabbing;
}

.pdf-card.sortable-ghost {
    opacity: 0.25;
}

.pdf-card.sortable-chosen {
    box-shadow:
        0 12px 28px
        rgba(0, 0, 0, 0.14);
}

.preview-wrap {
    position: relative;

    width: 100%;
    aspect-ratio: 0.72;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #f0f1f3;

    border-radius: 9px;
}

.preview-wrap canvas {
    max-width: 100%;
    max-height: 100%;

    display: block;
}

.preview-loading {
    color: #979ca3;

    font-size: 13px;
}

.drag-handle {
    position: absolute;
    top: 20px;
    left: 20px;

    z-index: 4;

    min-width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 8px;

    border-radius: 8px;

    background: rgba(255, 255, 255, 0.92);

    color: #5f6368;

    font-size: 16px;

    box-shadow:
        0 2px 7px
        rgba(0, 0, 0, 0.09);
}

.delete-btn {
    position: absolute;
    top: 20px;
    right: 20px;

    z-index: 5;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 8px;

    cursor: pointer;

    background: rgba(255, 255, 255, 0.94);

    color: #b3261e;

    font-size: 19px;

    box-shadow:
        0 2px 7px
        rgba(0, 0, 0, 0.09);
}

.delete-btn:hover {
    background: #fff0ef;
}

.pdf-meta {
    padding: 12px 3px 2px;
}

.pdf-name {
    overflow: hidden;

    margin-bottom: 6px;

    text-overflow: ellipsis;
    white-space: nowrap;

    color: #292c30;

    font-size: 14px;
    font-weight: 700;
}

.pdf-details {
    display: flex;
    gap: 8px;

    color: #878c93;

    font-size: 12px;
}


/* Footer area */

.merge-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 19px 24px;

    border-top: 1px solid #e8eaed;

    background: #ffffff;
}

.merge-info {
    display: flex;
    align-items: center;

    color: #6d7278;

    font-size: 13px;
}

.dot {
    margin: 0 8px;
}

.merge-btn {
    min-width: 150px;

    padding: 13px 22px;

    border-radius: 11px;

    background: #202124;
    color: #ffffff;

    font-size: 15px;
}

.merge-btn:hover:not(:disabled) {
    background: #000000;
}

.merge-btn:disabled {
    cursor: not-allowed;

    background: #c5c8cc;
    color: #ffffff;
}

.merge-btn.loading {
    cursor: wait;
}


/* Message */

.message-box {
    margin-top: 18px;

    padding: 14px 17px;

    border-radius: 11px;

    font-size: 14px;
    line-height: 1.6;
}

.message-box.error {
    background: #fff0ef;
    color: #a9251d;

    border: 1px solid #f0c2be;
}

.message-box.success {
    background: #eef8f0;
    color: #246b31;

    border: 1px solid #c9e6cf;
}

.hidden {
    display: none !important;
}


@media (max-width: 700px) {

    .merge-page {
        padding: 38px 0 60px;
    }

    .merge-title h1 {
        font-size: 34px;
    }

    .upload-area {
        min-height: 330px;
    }

    .workspace-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .file-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 11px;

        padding: 14px;
    }

    .pdf-card {
        padding: 8px;
    }

    .drag-handle {
        top: 14px;
        left: 14px;
    }

    .delete-btn {
        top: 14px;
        right: 14px;
    }

    .merge-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .merge-btn {
        width: 100%;
    }
}
