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

@import 'ubuntu-colors';

$light: if($variant=='light', true, false);
$base_color: if($variant == 'light', #FFFFFF, $inkstone);
$bg_color: if($variant == 'light', #F5F6F7, darken($inkstone, 3%));
$fg_color: if($variant == 'light', $inkstone, $porcelain);
$text_color: if($variant == 'light', #2D2D2D, $porcelain);
//
$selected_fg_color: white;
$selected_bg_color: $orange;
$borders_color: if($variant == 'light', darken($bg_color, 18%), darken($bg_color, 4%));
$link_color: $blue;
$link_visited_color: if($variant == 'light', darken($link_color, 20%), lighten($link_color, 10%));
$borders_edge: if($variant == 'light', rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4));
$top_hilight: $borders_edge;
$dark_fill: if($variant == 'light',#CDCDCD, $ash);
$menu_color: if($variant == 'light', $base_color, transparentize(lighten($jet, 2%), 0.02));
$popover_bg_color: $bg_color;
$popover_hover_color: if($variant=='light', darken($bg_color, 7%), lighten($bg_color, 7%));
//
$scrollbar_bg_color: if($variant == 'light', mix($bg_color, $fg_color, 90%), mix($base_color, $bg_color, 50%));
$scrollbar_slider_color: transparentize($fg_color, 0.4);
$scrollbar_slider_hover_color: $fg_color;
$scrollbar_slider_active_color: if($variant=='light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 10%));
//
$button_bg_color: lighten($bg_color, if($variant == 'light', 3%, 6%));
$button_backdrop_bg_color: transparentize($button_bg_color, 0.3);
//
$warning_color: $yellow;
$error_color: $red;
$success_color: $green;
$destructive_color: darken($red, 10%);
$neutral_color: $blue;
//
$osd_fg_color: $porcelain;
$osd_bg_color: transparentize($jet, 0.3);
$osd_button_bg_color: opacify($osd_bg_color, 1);
$osd_borders_color: transparentize(white, 0.87);
$osd_text_color: transparentize($osd_fg_color, .1);
$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), if($variant=='light', 65%, 50%));
//
$sidebar_bg_color: if($variant == 'light', white, $base_color);
$base_hover_color: transparentize($fg_color, 0.85);
$base_active_color: transparentize($fg_color, 0.80);
//
$tooltip_borders_color: transparentize(white, 0.9);
$shadow_color: transparentize(black, 0.9);
//
$drop_target_color: $green;
//insensitive state derived colors
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);
$insensitive_bg_color: mix($bg_color, $base_color, 60%);
$insensitive_dark_fill: mix($bg_color, $dark_fill);
$insensitive_borders_color: transparentize($borders_color, 0.3);

//colors for the backdrop state, derived from the main colors.
$backdrop_base_color: if($variant == 'light', darken($base_color, 5%), $base_color);
$backdrop_text_color: transparentize($text_color, 0.2);
$backdrop_bg_color: if($variant == 'light', darken($bg_color, 3%), lighten($bg_color, 2%));
$backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 50%);
$backdrop_insensitive_color: if($variant == 'light', darken($backdrop_bg_color, 15%), lighten($backdrop_bg_color,15%));
$backdrop_insensitive_dark_fill: $insensitive_dark_fill;
$backdrop_selected_fg_color: if($variant == 'light', $backdrop_base_color, $backdrop_text_color);
$backdrop_borders_color: if($variant == 'light', darken($borders_color, 3%), lighten($borders_color, 3%));
$backdrop_dark_fill: if($variant == 'light', darken($dark_fill, 5%), $dark_fill);
$backdrop_sidebar_bg_color: if($variant == 'light',darken($sidebar_bg_color, 3%), $sidebar_bg_color);

$backdrop_scrollbar_bg_color: darken($backdrop_bg_color, 3%);
$backdrop_scrollbar_slider_color: transparentize($backdrop_fg_color, 0.4);

$backdrop_menu_color: if($variant == 'light', $backdrop_base_color, lighten($headerbar_bg_color, 8%));

// Headerbar widgets colors
$hb_pathbar_bg: lighten($headerbar_bg_color, 5%);
$hb_pathbar_bg_backdrop: mix(lighten($headerbar_bg_color, 5%), $headerbar_bg_color, 50%);
$hb_pathbar_border_backdrop: darken($hb_pathbar_bg_backdrop, 2%);
$hb_button_bg_hover: lighten($headerbar_bg_color, 10%);
