/* 2026-09-22 10:42 北京时间：新增图片水印与图片拼接可视化编辑样式，只作用于对应工具页面。 */
.watermark-workspace,
.stitch-workspace {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
}

.visual-preview-shell {
    margin-top: 8px;
}

.visual-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
}

.visual-preview-toolbar > div {
    min-width: 0;
}

.visual-preview-toolbar strong,
.visual-preview-toolbar span {
    display: block;
}

.visual-preview-toolbar strong {
    overflow: hidden;
    color: #344054;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visual-preview-toolbar > div > span {
    margin-top: 2px;
    color: #8a96a6;
    font-size: 11px;
}

.preview-help {
    flex: 0 0 auto;
    color: #6f7e92;
    font-size: 11px;
}

.visual-canvas-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 12px;
    overflow: auto;
    border: 1px solid #d9e1eb;
    border-radius: 10px;
    background-color: #eef2f7;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,.72) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.72) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,.72) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.72) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.visual-canvas-wrap canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 18px rgba(31, 42, 55, .10);
}

.watermark-canvas-wrap canvas {
    cursor: default;
    touch-action: none;
}

.watermark-canvas-wrap canvas.can-drag {
    cursor: grab;
}

.watermark-canvas-wrap canvas.is-dragging {
    cursor: grabbing;
}

.visual-editor-tip {
    margin: 8px 0 0;
    color: #7b8899;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

.preview-thumb-list {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-bottom: 2px;
    overflow-x: auto;
}

.preview-thumb {
    position: relative;
    flex: 0 0 78px;
    padding: 4px;
    border: 1px solid #d8e0ea;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.preview-thumb:hover {
    border-color: #aac8f4;
    background: #f8fbff;
}

.preview-thumb.is-active {
    border-color: #7fb0f6;
    box-shadow: 0 0 0 2px rgba(47, 124, 246, .10);
}

.preview-thumb img {
    display: block;
    width: 68px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    background: #eef2f7;
}

.preview-thumb span {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #65748a;
    font-size: 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#wmTextColor,
#stitchBg {
    cursor: pointer;
}

.stitch-output-summary {
    margin: 4px 0 10px;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.stitch-output-summary span,
.stitch-output-summary strong,
.stitch-output-summary small {
    display: block;
}

.stitch-output-summary span {
    color: #7c899a;
    font-size: 11px;
}

.stitch-output-summary strong {
    margin: 2px 0;
    color: #26364b;
    font-size: 16px;
}

.stitch-output-summary small {
    color: #8a96a6;
    font-size: 11px;
    line-height: 1.5;
}

.stitch-file-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.stitch-file-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 7px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
}

.stitch-file-item img {
    display: block;
    width: 48px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
    background: #eef2f7;
}

.stitch-file-info {
    min-width: 0;
}

.stitch-file-info strong,
.stitch-file-info span {
    display: block;
}

.stitch-file-info strong {
    overflow: hidden;
    color: #344054;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stitch-file-info span {
    margin-top: 2px;
    color: #8a96a6;
    font-size: 10px;
}

.stitch-file-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.stitch-mini-btn {
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid #d5dee9;
    border-radius: 7px;
    background: #fff;
    color: #526176;
    font-size: 11px;
    cursor: pointer;
}

.stitch-mini-btn:hover:not(:disabled) {
    border-color: #a8c4ed;
    background: #f5f9ff;
    color: #2167cb;
}

.stitch-mini-btn:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.stitch-mini-btn.is-delete:hover:not(:disabled) {
    border-color: #efc2c2;
    background: #fff7f7;
    color: #c13b3b;
}

@media (max-width: 900px) {
    .watermark-workspace,
    .stitch-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .visual-preview-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .preview-help {
        flex: none;
    }

    .visual-canvas-wrap {
        min-height: 220px;
        padding: 8px;
    }

    .stitch-file-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .stitch-file-item img {
        width: 42px;
        height: 38px;
    }

    .stitch-file-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}
