@use "sass:color";
@use "sass:map";
@use '../abstracts/cds-config' as c;


/// #####################################################
/// LIGHT MODE
/// #####################################################

$color_light-foreground: c.$config-light-foreground;
$color_light-background: c.$config-light-background;
 
$color_light-accents: (
    "primary": c.$config-light-accent-primary,
    "danger": c.$config-light-accent-danger);

$color_light-feedbacks: (
    "information": c.$config-light-feedback-information,
    "success": c.$config-light-feedback-success,
    "alert": c.$config-light-feedback-alert,
    "error": c.$config-light-feedback-error
    //"neutral": c.$config-light-feedback-neutral
);

$color_light-alternatives: (
    1: c.$config-light-alternative-1,
    2: c.$config-light-alternative-2,
    3: c.$config-light-alternative-3,
    4: c.$config-light-alternative-4,
    5: c.$config-light-alternative-5,
    6: c.$config-light-alternative-6,
    7: c.$config-light-alternative-7,
    8: c.$config-light-alternative-8,
    9: c.$config-light-alternative-9,
    10: c.$config-light-alternative-10);



///Getting background from neutral color
/// =========================
//$color_light-background: mix($color_light-foreground, white, 2%); // #f3f5f8;

//Neutral palette
$palette-neutral-1000: $color_light-foreground;
$palette-neutral-900: color.mix($color_light-foreground, $color_light-background, 95%);
$palette-neutral-800: color.mix($color_light-foreground, $color_light-background, 80%);
$palette-neutral-700: color.mix($color_light-foreground, $color_light-background, 60%);
$palette-neutral-600: color.mix($color_light-foreground, $color_light-background, 50%);
$palette-neutral-500: color.mix($color_light-foreground, $color_light-background, 25%);
$palette-neutral-400: color.mix($color_light-foreground, $color_light-background, 20%);
$palette-neutral-300: color.mix($color_light-foreground, $color_light-background, 15%);
$palette-neutral-200: color.mix($color_light-foreground, $color_light-background, 10%);
$palette-neutral-100: color.mix($color_light-foreground, $color_light-background, 5%);
$palette-neutral-000: $color_light-background;

$color_accent-palettes: (
);

@each $key, $accent-color in $color_light-accents {
    $palette: (
        100: color.mix($accent-color, $color_light-background, 20%),
        200: color.mix($accent-color, $color_light-background, 40%),
        300: color.mix($accent-color, $color_light-background, 60%),
        400: color.mix($accent-color, $color_light-background, 80%),
        500: $accent-color,
        600: color.mix($accent-color, $color_light-foreground, 80%),
        700: color.mix($accent-color, $color_light-foreground, 60%),
        800: color.mix($accent-color, $color_light-foreground, 40%),
        900: color.mix($accent-color, $color_light-foreground, 20%)
    );
$color_accent-palettes: map.merge($color_accent-palettes, ($key: $palette));
}

$color_feedback-palettes: (
);

@each $key, $feedback-color in $color_light-feedbacks {
    $palette: (
        100: color.mix($feedback-color, $color_light-background, 20%),
        200: color.mix($feedback-color, $color_light-background, 40%),
        300: color.mix($feedback-color, $color_light-background, 60%),
        400: color.mix($feedback-color, $color_light-background, 80%),
        500: $feedback-color,
        600: color.mix($feedback-color, $color_light-foreground, 80%),
        700: color.mix($feedback-color, $color_light-foreground, 60%),
        800: color.mix($feedback-color, $color_light-foreground, 40%),
        900: color.mix($feedback-color, $color_light-foreground, 20%)
    );
$color_feedback-palettes: map.merge($color_feedback-palettes, ($key: $palette));
}

$color_alternative-palettes: (
);

@each $key, $alternative-color in $color_light-alternatives {
    $palette: (
        100: color.mix($alternative-color, $color_light-background, 20%),
        200: color.mix($alternative-color, $color_light-background, 40%),
        300: color.mix($alternative-color, $color_light-background, 60%),
        400: color.mix($alternative-color, $color_light-background, 80%),
        500: $alternative-color,
        600: color.mix($alternative-color, $color_light-foreground, 80%),
        700: color.mix($alternative-color, $color_light-foreground, 60%),
        800: color.mix($alternative-color, $color_light-foreground, 40%),
        900: color.mix($alternative-color, $color_light-foreground, 20%)
    );
$color_alternative-palettes: map.merge($color_alternative-palettes, ($key: $palette));
}