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

$base_color: if($variant =='light', #ffffff, #242424);
$text_color: if($variant == 'light', #363636, #dadada);
$bg_color: if($variant =='light', #f5f5f5, #333333);
$fg_color: if($variant =='light', #242424, #dedede);
$alt_fg_color: if($variant=='light', #383838, #3d3d3d);

$selected_fg_color: #ffffff;
$selected_bg_color: if($variant == 'light', #315bef, #315bef);

$alt_selected_bg_color: lighten($selected_bg_color, 6%);
$selected_borders_color: darken($selected_bg_color, 20%);
$borders_color: if($variant =='light', rgba(#000000, 0.15), rgba(#ffffff, 0.12));
$borders_bottom_color: if($variant =='light', rgba(#000000, 0.27), rgba(#ffffff, 0.12));
$dark_borders_color: if($variant =='light', rgba(#000000, 0.15), rgba(#000000, 0.15));
$solid_borders_color: if($variant == 'light', darken($bg_color, 15%), lighten($bg_color, 8%));
$dark_solid_borders_color: if($variant == 'light', darken($bg_color, 15%), darken($bg_color, 5%));
$highlight: if($variant =='light', rgba(#ffffff, 0.13), rgba(#ffffff, 0.10));

$link_color: if($variant == 'light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 20%));
$link_visited_color: if($variant == 'light', darken($text_color, 5%), lighten($text_color, 10%));

$selection_mode_bg: #6887cd;
$selection_mode_fg: $selected_fg_color;
$warning_color: #F27835;
$error_color: #FC4138;
$warning_fg_color: #ffffff;
$error_fg_color: #ffffff;
$success_color: #71c837;
$destructive_color: #db5b5b;
$suggested_color: #3484e2;
$destructive_fg_color: #ffffff;
$suggested_fg_color: #ffffff;

$progress_color: $selected_bg_color;
$drop_target_color: #F08437;

$insensitive_fg_color: if($variant == 'light', transparentize($fg_color, 0.45), transparentize($fg_color, 0.55));
$insensitive_bg_color: if($variant == 'light', mix($bg_color, $base_color, 40%), lighten($bg_color, 2%));

$header_bg: if($variant == 'light', #e5e5e5, #373737);
$header_highlight: if($variant == 'dark', #434343, #f5f5f5);
$header_top: if($variant == 'dark', #434343, #e9e9e9);
$header_middle: if($variant == 'dark', #3e3e3e, #e2e2e2);
$header_bottom: if($variant == 'dark', #383838, #d2d2d2);

$header_bg_backdrop: if($variant == 'light', #F6F6F6, #313131);
$header_border: if($variant=='light', #a1a1a1, #101010);

$header_fg: if($variant=='light', #575757, #FDFDFD);

$dark_sidebar_bg: if($variant=='light', #f6f6f6, #3B3B3B);
$dark_sidebar_fg: $text_color;
$dark_sidebar_border: if($variant=='light', darken(opacify($dark_sidebar_bg, 1), 5%), lighten(opacify($dark_sidebar_bg, 1), 5%));
$sidebar_theme_color: if($variant=='light', #C7C7C7, rgba(#C7C7C7, 0.25));

$osd_fg_color: #dadada;
$osd_bg_color: #2a2a2a;

$osd_button_bg: transparentize(lighten($osd_bg_color, 22%), 0.6);
$osd_button_border: transparentize(darken($osd_bg_color, 12%), 0.6);

$osd_entry_bg: transparentize(lighten($osd_bg_color, 22%), 0.6);
$osd_entry_border: transparentize(darken($osd_bg_color, 12%), 0.6);

$osd_insensitive_bg_color: darken($osd_bg_color, 3%);
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 30%);
$osd_borders_color: $osd_button_border;

$panel_bg: if($variant == 'light', #FEFEFE, #2a2a2a);
$panel_fg: $text_color;
$panel_top_color: if($variant == 'dark', #333333, #f5f5f5);
$panel_bottom_color: if($variant == 'dark', #2a2a2a, #e2e2e2);
$panel_border_color: if($variant =='light', rgba(#000000, 0.2), rgba(#000000, 0.72));

$entry_bg: if($variant=='light', $base_color, lighten($base_color, 0%));
$entry_border: if($variant == 'light', #cfd6e6, darken($borders_color, 0%));
$entry_bottom_border: $borders_bottom_color;
$entry_highlight: if($variant == 'light', rgba($selection_mode_bg, 0.75), darken($selection_mode_bg, 15%));

$button_bg: if($variant == 'light', #ffffff, #656565);
$button_border: $borders_color;
$button_active_border: #487afa;
$button_highlight: if($variant == 'light', #ffffff, rgba(#ffffff, 0.1));
$button_borders: if($variant == 'light', $button_border, $dark_borders_color);
$button_borders_hover: if($variant == 'light', $button_border, $dark_borders_color);
$button_borders_active: if($variant == 'light', $button_active_border, $dark_borders_color);
