// When color definition differs for dark and light variant,
// it gets @if ed depending on $variant
@import "ubuntu-colors";
@import "pop_os_colors";

$base_color: if($variant == 'light', #eceff4, #2e3440); 
$text_color: if($variant == 'light', #2e3440, #d8dee9);
$bg_color: if($variant == 'light', #eceff4, #3b4252);
$fg_color: if($variant == 'light', #3d4455, #d8dee9); 

$dark_bg_color: $dark_ui_700;
$dark_fg_color: $light_ui_300;

$selected_fg_color: #d8dee9;
$selected_bg_color: if($variant=='light', #768bb2, #4c566a); // #48b9c7 #94EBEB

$selected_borders_color: if($variant== 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 30%));
$borders_color: if($variant == 'light', rgba(darken($bg_color, 18%), 0.5), rgba(darken($bg_color, 10%), 0.5));
$borders_edge: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93));
$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;

$warning_color: $text_yellow;
$error_color: $text_red;
$success_color: if($variant=='light', #82BF8C, #90CFB0);
$destructive_color: if($variant=='light', #E56A54, #EA9090);

$osd_fg_color: #d8dee9;
$osd_text_color: #d8dee9;
$osd_bg_color: #2e3440;
$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
$osd_borders_color: transparentize(black, 0.3);
$osd_outer_borders_color: transparentize(white, 0.84);

$tooltip_borders_color: $osd_outer_borders_color;
$shadow_color: transparentize(black, 0.9);

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

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

$base_hover_color: transparentize(#2e3440, 0.8);
$base_active_color: transparentize(#2e3440, 0.75);
$hover_fg_color: lighten($selected_fg_color, .25);
$active_fg_color: transparentize($selected_fg_color, .5);

//Colors for certain widgets
$entry_color: if($variant=='light', #768bb2, #6c80a5);
$close_button_color: $red;

$panel_bg_color: darken($dark_bg_color, 10%);
$dash_bg_color: $panel_bg_color;
$panel-alpha-value: 0.0;
$panel_opaque_value: 0.0;

$dash-alpha-value: 0.0;
$dash-opaque-alpha-value: 0.0;

//special cased widget colors
$suggested_bg_color: if($variant == 'light', lighten($green, 5%), darken($green, 5%));
$suggested_border_color: if($variant=='light', darken($suggested_bg_color, 5%), darken($suggested_bg_color, 10%));
$progress_bg_color: if($variant=='light', $aubergine, darken($aubergine, 8%));
$progress_border_color: if($variant=='light', $aubergine, darken($aubergine, 8%));
$checkradio_bg_color: if($variant=='light', $aubergine, darken($aubergine, 8%));
$checkradio_fg_color: #768bb2;
$switch_bg_color: if($variant=='light', $aubergine, darken($aubergine, 8%));
$switch_border_color: if($variant=='light', darken($aubergine, 15%), darken($borders_color, 5%));
$focus_border_color: lighten(#81a1c1, 14%);
