/*
 文件名称：pdf-tool.css
 作者：wangkai（2026-11-24）
 创作时间：2026-11-24 22:40:00（北京时间）
 文件说明：PDF 工具箱样式，包含标签页、上传区、参数区、文件列表与移动端适配
*/

/* 页面容器 */
.pt-page {
    max-width: 1290px;
    margin: 24px auto 40px;
    padding: 0 12px;
}

/* 主面板 */
.pt-card {
    background: #ffffff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(31, 45, 61, 0.06);
    padding: 24px;
}

.pt-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    color: #1f2d3d;
}

.pt-sub {
    margin: 0 0 18px;
    font-size: 13px;
    color: #7a869a;
    line-height: 1.6;
}

/* 标签页 */
.pt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #e5e9f2;
    margin-bottom: 20px;
}

.pt-tab {
    position: relative;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    font-size: 14px;
    color: #5a6678;
    cursor: pointer;
    transition: color 0.2s;
}

.pt-tab:hover {
    color: #2563eb;
}

.pt-tab.is-active {
    color: #2563eb;
    font-weight: 600;
}

.pt-tab.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: #2563eb;
}

/* 面板显隐 */
.pt-panel {
    display: none;
}

.pt-panel.is-active {
    display: block;
}

/* 上传区 */
.pt-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 16px;
    border: 2px dashed #c9d4e8;
    border-radius: 10px;
    background: #f9fbff;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.pt-drop:hover,
.pt-drop.is-dragover {
    border-color: #2563eb;
    background: #f2f7ff;
}

.pt-drop__icon {
    width: 40px;
    height: 40px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #c9d4e8;
    color: #2563eb;
    font-size: 24px;
    background: #ffffff;
}

.pt-drop__text {
    font-size: 15px;
    color: #1f2d3d;
}

.pt-drop__hint {
    font-size: 12px;
    color: #9aa5b8;
}

/* 参数区 */
.pt-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.pt-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pt-field label {
    font-size: 13px;
    color: #5a6678;
}

.pt-input {
    width: 100%;
    height: 38px;
    padding: 6px 10px;
    border: 1px solid #d5dbe8;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    color: #1f2d3d;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pt-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

select.pt-input {
    cursor: pointer;
}

/* 操作区 */
.pt-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.pt-btn {
    padding: 9px 18px;
    border: 1px solid #d5dbe8;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    color: #1f2d3d;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.pt-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.pt-btn--primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.pt-btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.pt-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.pt-btn--sm {
    padding: 5px 12px;
    font-size: 13px;
}

.pt-tip {
    font-size: 13px;
    color: #7a869a;
}

.pt-tip.is-error {
    color: #dc2626;
}

.pt-tip.is-ok {
    color: #16a34a;
}

/* 文件列表 */
.pt-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.pt-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #fbfcfe;
}

/* 序号 / 缩略图 */
.pt-index {
    flex: 0 0 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background: #eef4ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
}

.pt-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: #eef2f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa5b8;
    font-size: 12px;
}

.pt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 文件信息 */
.pt-info {
    flex: 1 1 auto;
    min-width: 0;
}

.pt-name {
    font-size: 14px;
    color: #1f2d3d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #7a869a;
}

/* 单条操作 */
.pt-item-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
}

/* 当前 PDF 信息（拆分面板） */
.pt-file-info {
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #fbfcfe;
    font-size: 13px;
    color: #1f2d3d;
}

.pt-file-info__meta {
    margin-left: 8px;
    font-size: 12px;
    color: #7a869a;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .pt-card {
        padding: 16px;
    }

    .pt-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .pt-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
