@use 'sass:map';
@use 'mixins' as *;

// 后台主体窗口左右间距
$main-space: 18px;
$primary-light: #2563eb;
$surface-soft: #eef3f8;
$surface-muted: #f7f9fc;
$text-muted: #64748b;
$shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.08);
$shadow-card: 0 10px 24px rgba(15, 23, 42, 0.06);
$radius-panel: 10px;
$radius-control: 7px;

// --ba-background
$bg-color: () !default;
$bg-color: map.merge(
    (
        '': #eef3f8,
        'overlay': #ffffff,
        'soft': $surface-muted,
        'muted': $surface-soft,
    ),
    $bg-color
);

// --ba-border-color
$border-color: () !default;
$border-color: map.merge(
    (
        '': #d8e0ea,
        'soft': #e8eef5,
        'strong': #c7d2de,
    ),
    $border-color
);

:root {
    @include set-css-var-value('main-space', $main-space);
    @include set-css-var-value('color-primary-light', $primary-light);
    @include set-css-var-value('surface-soft', $surface-soft);
    @include set-css-var-value('surface-muted', $surface-muted);
    @include set-css-var-value('text-muted', $text-muted);
    @include set-css-var-value('shadow-soft', $shadow-soft);
    @include set-css-var-value('shadow-card', $shadow-card);
    @include set-css-var-value('radius-panel', $radius-panel);
    @include set-css-var-value('radius-control', $radius-control);
    @include set-component-css-var('bg-color', $bg-color);
    @include set-component-css-var('border-color', $border-color);

    --el-color-primary: #2563eb;
    --el-color-primary-light-3: #5b86f0;
    --el-color-primary-light-5: #8eadf5;
    --el-color-primary-light-7: #c7d7fb;
    --el-color-primary-light-8: #dbe6fd;
    --el-color-primary-light-9: #eef4ff;
    --el-color-primary-dark-2: #1d4ed8;
    --el-color-success: #168a5b;
    --el-color-success-light-9: #ecfdf5;
    --el-color-warning: #b7791f;
    --el-color-warning-light-9: #fff7ed;
    --el-color-danger: #dc3f4d;
    --el-color-danger-light-9: #fff1f2;
    --el-color-info: #64748b;
    --el-border-radius-base: #{$radius-control};
    --el-border-radius-small: 5px;
    --el-border-radius-round: #{$radius-panel};
    --el-box-shadow-light: #{$shadow-card};
    --el-box-shadow: #{$shadow-soft};
    --el-text-color-primary: #172033;
    --el-text-color-regular: #334155;
    --el-text-color-secondary: #64748b;
    --el-fill-color-light: #f7f9fc;
    --el-fill-color-lighter: #fbfcfe;
}
