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

@import "pop_os-palette";

$base_color: if($variant == 'light', $white, $dark_neutral_grey_900);
$text_color: if($variant == 'light', $black, $white);
$bg_color: if($variant == 'light', $light_ui_300, $dark_neutral_grey_700);
$fg_color: if($variant == 'light', $dark_ui_900, $light_ui_500);

$selected_fg_color: $black;
$selected_bg_color: $blue;
$selected_borders_color: if($variant == 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 30%));
$borders_edge: if($variant == 'light', transparentize($white, 0.2), transparentize($fg_color, 0.93));
$link_color: $text_blue;
$link_visited_color: $text_purple;
$top_hilight: $borders_edge;
$headerbar_bg_color: if($variant == 'light', $dark_warm_grey, desaturate($dark_ui_300, 100%));
$headerbar_fg_color: transparentize($white, 0.2);

$scrollbar_bg_color: if($variant == 'light', mix($bg_color, $fg_color, 80%), mix($base_color, $bg_color, 50%));
$scrollbar_slider_color: mix($fg_color, $bg_color, 60%);
$scrollbar_slider_hover_color: mix($fg_color, $bg_color, 80%);
$scrollbar_slider_active_color: if($variant=='light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 10%));

$warning_color: $yellow;
$error_color: $red;
$success_color: $green;
$destructive_color: $red;

$osd_fg_color: $light_ui_500;
$osd_text_color: $white;
$osd_bg_color: transparentize($dark_ui_700, 0.3);
$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);

$sidebar_bg_color: mix($bg_color, $base_color, 50%);

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

$drop_target_color: $highlights_orange;

//special cased widget colors
$suggested_bg_color: $green;
$suggested_border_color: if($variant == 'light', darken($suggested_bg_color, 15%), darken($suggested_bg_color, 30%));
$progress_bg_color: $blue;
$progress_border_color: if($variant == 'light', darken($progress_bg_color, 15%), darken($progress_bg_color, 30%));
$checkradio_bg_color: $orange;
$checkradio_fg_color: $black;
$checkradio_borders_color: $checkradio_bg_color;
$switch_bg_color: $orange;
$switch_borders_color: if($variant == 'light',darken($switch_bg_color,15%),darken($switch_bg_color,30%));
$focus_border_color: $orange;
$alt_focus_border_color: if($variant == 'light', transparentize($white, 0.2), transparentize($white,0.7));
$dim_label_opacity: 0.7;

$close_button_color: mix($orange, $red, 50%);
