/* ================================================================
   菜刀客在线工具页 · color-picker.html 私有样式
   需在 /css/common.css 之后加载。
   ================================================================ */

/* ---- 上传区 ---- */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 36px 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;
}

/* ---- 拾色画布 ---- */
.stage-wrap {
    position: relative;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

#stage {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    cursor: crosshair;
    background: #eef0f4;
    image-rendering: auto;
}

.stage-hint {
    padding: 6px 10px;
    font-size: 12px;
    color: #9ca3af;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

.tip {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

/* ---- 色块展示 ---- */
.swatch {
    height: 120px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: repeating-conic-gradient(#f3f4f6 0% 25%, #fff 0% 50%) 0 0 / 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swatch-msg {
    font-size: 13px;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 6px;
}

/* ---- 颜色值行 ---- */
.value-rows {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.value-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.v-label {
    flex: 0 0 42px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.v-value {
    flex: 1;
    font-size: 13px;
    color: #334155;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: Consolas, Menlo, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.value-row .btn {
    padding: 4px 10px;
    font-size: 12px;
}

/* ---- 取色历史 ---- */
.history {
    margin-top: 14px;
}

.history-title {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    font-family: Consolas, Menlo, monospace;
    transition: all 0.2s;
}

.chip:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.chip-dot {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

@media (max-width: 600px) {
    #stage {
        width: 100%;
        height: auto;
    }
}