// When color definition differs for dark and light variant,
// it gets @if ed depending on $variant


$base_color: if($variant == 'light', #fcfcfc, #232629);
$text_color: if($variant == 'light', #31363b, #EEEFF0);
$bg_color: if($variant == 'light', #eff0f1, #31363B);
$fg_color: if($variant == 'light', #31363b, #EEEFF0);

$selected_fg_color: if($variant == 'light', #fcfcfc, #EEEFF0);
$selected_bg_color: if($variant == 'light', #3daee9, #3DADE8);
$selected_borders_color: if($variant== 'light', $selected_bg_color, $selected_bg_color);
$titlebar_bg_color: if($variant == 'light',#475057 , #31363B); // add to public 
$titlebar_fg_color: if($variant == 'light', #fcfcfc, #EEEFF0); // add to public
$hover_color: if($variant == 'light', #93cee9, #3DADE8);

// todo
$borders_color: if($variant == 'light', #bdc3c7, #696D71);
$borders_edge: if($variant == 'light', white, transparentize($fg_color, 0.9));
$link_color: if($variant == 'light', darken($selected_bg_color,10%), lighten($selected_bg_color,20%));
$link_visited_color: if($variant == 'light', darken($selected_bg_color,20%), lighten($selected_bg_color,10%));
$top_hilight: $borders_edge;

$scrollbar_bg_color: darken($bg_color, 7%);

$warning_color: #f67400;
$error_color: #ed1515;
$success_color: if($variant == 'light', #11d116, darken(#73d216,10%));
$destructive_color: if($variant == 'light', #ef2929, darken(#ef2929,10%));
$icon_red: #da4453;

$osd_fg_color: if($variant == 'light', #31363b, #EEEFF0);
$osd_text_color: if($variant == 'light', #31363b, #EEEFF0);
$osd_bg_color: transparentize($base_color, 0.2);
$osd_insensitive_bg_color: shade($osd_fg_color, 0.3);
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
$osd_borders_color: transparentize(black, 0.3);

$sidebar_bg_color: $bg_color;

$tooltip_borders_color: transparentize(white, 0.9);

//insensitive state derived colors
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);
$insensitive_bg_color: mix($bg_color, $fg_color, 95%);
$insensitive_borders_color: $borders_color;

//colors for the backdrop state, derived from the main colors.
$backdrop_base_color: if($variant ==' light', $base_color, lighten($base_color, 1%));
$backdrop_text_color: $text_color;
$backdrop_bg_color: $bg_color;
$backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 25%);
$backdrop_insensitive_color: if($variant == 'light', darken($backdrop_bg_color, 15%), lighten($backdrop_bg_color, 15%));
$backdrop_selected_fg_color: $selected_fg_color;
$backdrop_borders_color: mix($borders_color, $bg_color, 90%);
$backdrop_dark_fill: mix($backdrop_borders_color, $backdrop_bg_color, 35%);
$backdrop_sidebar_bg_color: lighten($backdrop_bg_color,5%);

$backdrop_scrollbar_bg_color: darken($backdrop_bg_color, 3%);
