/* ================================================================
   菜刀客在线工具页 · solid-color-generator.html 私有样式
   需在 /css/common.css 之后加载。
   ================================================================ */

/* ---- 颜色选择行 ---- */
.color-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.color-picker {
    width: 48px;
    height: 40px;
    padding: 2px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.flex-1 {
    flex: 1;
}

/* ---- 常用色块 ---- */
.color-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chip {
    width: 26px;
    height: 26px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.chip:hover {
    transform: scale(1.1);
}

.chip.active {
    border: 2px solid #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* ---- 常见尺寸 ---- */
.size-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.size-quick .btn {
    padding: 6px 10px;
    font-size: 12px;
}

/* ---- 预览区 ---- */
.solid-preview {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f3f5;
    background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%),
                      linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    overflow: auto;
}

.solid-preview img {
    max-width: 100%;
    max-height: 56vh;
    width: auto;
    height: auto;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* ---- 生成信息 ---- */
.solid-info {
    margin-top: 4px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 13px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #6b7280;
}

.info-color {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #333;
    font-family: Consolas, Monaco, 'Courier New', monospace;
}

#colorDot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    display: inline-block;
}

@media (max-width: 600px) {
    .color-row {
        flex-direction: column;
    }

    .color-picker {
        width: 100%;
        height: 44px;
    }
}