/* ================================================================
   菜刀客在线工具页 · signature-extractor.html 私有样式
   需在 /css/common.css 之后加载。
   ================================================================ */

/* ---- 隐私提示条 ---- */
.privacy-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    justify-content: center;
}

.privacy-notice .icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* ---- 上传区 ---- */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #eef2ff;
}

.upload-area .icon {
    font-size: 44px;
    margin-bottom: 10px;
}

.upload-area .upload-text {
    color: #6b7280;
    font-size: 14px;
}

.upload-area .upload-text strong {
    color: #667eea;
}

.upload-area .upload-tip {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

/* ---- 文件信息卡片 ---- */
.info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.info-card .thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #fff;
}

.info-card .meta {
    flex: 1;
    min-width: 0;
}

.info-card .name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-card .dims {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.btn-remove {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.btn-remove:hover {
    color: #dc2626;
}

/* ---- 参数滑杆 ---- */
.param-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.param-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.param-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.param-tip {
    font-size: 12px;
    color: #9ca3af;
}

.param-row input[type="range"] {
    width: 100%;
    accent-color: #667eea;
    cursor: pointer;
}

.val {
    font-weight: 600;
    color: #667eea;
    font-variant-numeric: tabular-nums;
}

.opt-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.opt-line input {
    accent-color: #667eea;
}

/* ---- 结果区：预览背景切换 ---- */
.preview-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.preview-bar .preview-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.effect-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.effect-bar .btn {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.effect-bar .btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.effect-bar .btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

/* ---- 签名预览画布 ---- */
.sig-preview {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    transition: background 0.2s;
}

.sig-preview canvas {
    max-width: 100%;
    max-height: 420px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.sig-preview.bg-checker {
    background:
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%),
        linear-gradient(45deg, #e5e7eb 25%, #f9fafb 25%, #f9fafb 75%, #e5e7eb 75%);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
}

.sig-preview.bg-white {
    background: #ffffff;
}

.sig-preview.bg-cream {
    background: #f6efdd;
}

.sig-preview .empty-state {
    padding: 40px 20px;
}

/* ---- 下载格式选择 ---- */
.dl-select {
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    color: #374151;
    background: #ffffff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dl-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

/* ---- 提取结果信息卡 ---- */
.sig-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-card {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 10px;
    background: #f0f4ff;
    border-radius: 8px;
    border: 1px solid #e0e7ff;
}

.meta-card .label {
    font-size: 12px;
    color: #6b7280;
}

.meta-card .value {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    display: inline-block;
    flex-shrink: 0;
}

.sig-tip {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.7;
}

/* ---- 小屏适配 ---- */
@media (max-width: 600px) {
    .preview-bar {
        justify-content: center;
    }
    .effect-bar {
        justify-content: center;
    }
}