/* ============ 在线手写签名 - 工具特有样式 ============ */
/* 通用样式（容器布局、卡片、按钮、分隔线、info-box、section-row-1-2、比率按钮等）由 common.css 统一提供 */
/* 注：.ratio-options / .btn-ratio 为各工具自带，common.css 未提供 */

/* ---- 卡片标题中间尺寸 ---- */
.card-header-center {
    flex: 1;
    text-align: center;
}

/* ---- 选项按钮（比率 / 快捷尺寸等） ---- */
.ratio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-ratio {
    padding: 6px 12px;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ratio:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.btn-ratio.active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: #8b5cf6;
    color: white;
}

/* ---- 画布尺寸输入 ---- */
.custom-ratio-inputs {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.custom-ratio-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-ratio-item label {
    font-size: 12px;
    color: #6b7280;
}

.custom-input {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.custom-input:focus {
    border-color: #8b5cf6;
}

.custom-ratio-sep {
    font-size: 16px;
    color: #6b7280;
    padding-bottom: 6px;
    flex-shrink: 0;
}

/* ---- 颜色选择 ---- */
.color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.color-input {
    width: 36px;
    height: 36px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
    flex-shrink: 0;
}

.color-text {
    flex: 1;
    min-width: 80px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Consolas', monospace;
    outline: none;
}

.color-text:focus {
    border-color: #8b5cf6;
}

/* ---- 笔迹颜色预设 ---- */
.color-presets {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.color-preset {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: #8b5cf6;
}

.color-preset.active {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

/* ---- 滑块（带数值） ---- */
.range-with-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-slider {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #8b5cf6;
    border-radius: 50%;
    cursor: pointer;
}

.range-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #8b5cf6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    min-width: 48px;
    text-align: right;
}

/* ---- 签名画布 ---- */
.canvas-wrapper {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: crosshair;
}

.canvas-wrapper canvas {
    display: block;
    cursor: crosshair;
    touch-action: none;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
}
