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

// Main definitions
$base_color: if($variant == 'light', #f8f8f8, lighten(#1E282C, 2%));
$text_color: if($variant == 'light', #31363D, #C3C7D1);
$bg_color: if($variant == 'light', #EEEEEE, #1E282C);
$fg_color: if($variant == 'light', #31363d, #C3C7D1);

// Primary colors
$lime: #B3E235;
$red: #FF044A;
$orange: #f39c12;
$yellow: #f1c40f;
$purple: #9b59b6;
$darkpurple: #7b7bbd;
$cyan: #00b0ff;
$blue: #13b1d5;
$slider: #7b7bbd;

$selected_fg_color: #fefefe;
$selected_bg_color: if($variant == 'light', #ff5d73, #76A7A7);
$selected_borders_color: darken($selected_bg_color, 10%);
$borders_color: if($variant == 'light', transparentize(black,0.8), darken($bg_color, 7%));
$borders_edge: if($variant == 'light', transparentize(white, 0.8), transparentize(white, 0.9));
$link_color: $blue;
$link_visited_color:transparentize($link_color,0.5);
$top_highlight: if($variant == 'light', transparentize(white, 0.8), transparentize(white, 0.9));
$bottom_highlight: if($variant == 'light', transparentize(black, 0.8), transparentize(black, 0.9));
$dark_fill: mix($borders_color, $bg_color, 35%);
$headerbar_color: $bg_color;
$headerbar_fg_color: $text_color;
$menu_color: if($variant == 'light', $base_color, darken($bg_color, 1%));
$popover_bg_color: $menu_color;
$popover_hover_color: if($variant == 'light', darken($bg_color, 2%), lighten($base_color, 2%));

$scrollbar_bg_color: 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: if($variant == 'light', $orange, darken($orange,10%));
$error_color: if($variant == 'light', $red, darken($red,5%));
$success_color: if($variant == 'light', $cyan, darken($cyan,10%));
$destructive_color: if($variant == 'light', darken($red,5%), darken($red,10%));
$suggested_color: if($variant == 'light', $selected_bg_color, darken($selected_bg_color,10%));

$osd_fg_color: #fefefe;
$osd_text_color: white;
$osd_bg_color:  transparentize(#14171a, 0.2);
$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%);
$base_hover_color: transparentize($fg_color, 0.95);

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

$drop_target_color: #a1ce4b;

$text_shadow_color: if($variant == 'dark', $shadow_color, transparentize(white, 0.9));
$icon_shadow_color: $text_shadow_color;

$drop_target_color: #4e9a06;

// Infobar colors
$info_color: $lime;
$question_color: $cyan;

// Panel colors
$panel_bg_color:rgba(235, 235, 235, 0.7);
$panel_fg_color: $fg_color;
$panel_borders_color: rgba(235, 235, 235, 0.7);

// Disabled state colors
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);
$insensitive_bg_color: if($variant == 'light', mix($bg_color, $base_color, 60%), lighten($base_color, 3%));
$insensitive_base_color: darken($base_color, 5%);
$insensitive_borders_color: $borders_color;

// Backdrop state colors
$backdrop_base_color: if($variant == 'light', darken($base_color, 1%), lighten($base_color, 1%));
$backdrop_text_color: mix($text_color, $backdrop_base_color, 80%);
$backdrop_bg_color: $bg_color;
$backdrop_headerbar_bg_color: $headerbar_color;
$backdrop_headerbar_fg_color: if($variant == 'light', transparentize($headerbar_fg_color, 0.5), transparentize($headerbar_fg_color, 0.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_selected_bg_color:  transparentize($selected_bg_color, 0.4);
$backdrop_selected_fg_color: if($variant == 'light', $selected_fg_color, transparentize($selected_fg_color, 0.5));
$backdrop_borders_color: mix($borders_color, $bg_color, 90%);
$backdrop_dark_fill: mix($backdrop_borders_color, $backdrop_bg_color, 35%);
$backdrop_sidebar_bg_color: mix($backdrop_bg_color, $backdrop_base_color, 50%);

$backdrop_scrollbar_bg_color: darken($backdrop_bg_color, 3%);
$backdrop_scrollbar_slider_color: mix($backdrop_fg_color, $backdrop_bg_color, 40%);

$backdrop_menu_color: if($variant == 'light', $backdrop_base_color, mix($backdrop_bg_color, $backdrop_base_color, 20%));
