/* ============================================================
   PDF Merge & Split — page-specific styles
   Shared tool chrome lives in dev-tools.css; only blocks that are
   unique to this page are defined here (tabs, dropzone, file list,
   split preview). quick-scenarios follows the same pattern as the
   other tool stylesheets (base64-tool.css / json-tool.css).
   ============================================================ */

/* ---- Quick scenario buttons (same look as the other dev tools) ---- */
.quick-scenarios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -4px 0 16px;
}

.quick-scenarios-label {
    margin-right: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.scenario-btn {
    padding: 7px 14px;
    border: 1.5px solid #1a73e8;
    border-radius: 999px;
    background: #fff;
    color: #1a73e8;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.scenario-btn:hover,
.scenario-btn:focus-visible {
    background: #1a73e8;
    color: #fff;
    outline: none;
}

/* ---- Mode tabs ---- */
.pms-tabs {
    display: flex;
    gap: 4px;
    margin: 2px 0 18px;
    border-bottom: 1px solid #e3e6ea;
}

.pms-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 10px 16px;
    min-height: 44px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #5f6368;
    cursor: pointer;
}

.pms-tab:hover {
    color: #1a73e8;
}

.pms-tab:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: -2px;
    border-radius: 6px 6px 0 0;
}

.pms-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.pms-panel[hidden] {
    display: none;
}

/* ---- Dropzone base styles live in dev-tools.css ---- */

/* ---- File list (merge) ---- */
.pms-file-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}

.pms-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    background: #fff;
}

.pms-file-item.dragging {
    opacity: .5;
}

.pms-file-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pms-file-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2328;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pms-file-pages {
    font-size: 12px;
    color: #5f6368;
}

.pms-file-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.pms-file-move,
.pms-file-remove {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 15px;
    line-height: 1;
    color: #5f6368;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    cursor: pointer;
}

.pms-file-move:hover,
.pms-file-remove:hover {
    background: #f1f3f4;
    color: #1f2328;
}

.pms-file-move:focus-visible,
.pms-file-remove:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 1px;
}

.pms-file-remove:hover {
    color: #c5221f;
    border-color: #f4c7c3;
    background: #fce8e6;
}

/* ---- Split preview ---- */
.pms-preview {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f6f8fa;
    border: 1px solid #e3e8f0;
    border-radius: 10px;
    font-size: 13.5px;
    color: #3c4043;
}

.pms-preview-title {
    font-weight: 700;
    color: #1f2328;
}

.pms-preview ul {
    margin: 8px 0 0;
    padding-left: 18px;
    max-height: 220px;
    overflow: auto;
}

.pms-preview li {
    margin: 3px 0;
    font-variant-numeric: tabular-nums;
}

.pms-preview-empty {
    color: #5f6368;
}

/* ---- Range input ---- */
.pms-range-input {
    width: 100%;
    max-width: 260px;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .pms-tabs {
        gap: 0;
    }

    .pms-tab {
        flex: 1 1 0;
        padding: 10px 8px;
        font-size: 14px;
    }

    .pms-file-item {
        flex-wrap: wrap;
    }

    .pms-file-meta {
        flex-basis: calc(100% - 0px);
        order: -1;
    }

    .pms-file-actions {
        margin-left: auto;
    }

    .dev-tool-actions .dev-tool-btn {
        flex: 1 1 100%;
        justify-content: center;
        min-height: 44px;
    }

    .pms-range-input {
        max-width: 100%;
    }
}
