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

$base_color: if($variant=='light', #ffffff, lighten($jet, 4%));
$bg_color: if($variant=='light', #fafafa, lighten($jet, 6%));
$fg_color: if($variant=='light', $inkstone, $porcelain);
$text_color: $fg_color;

$selected_fg_color: $accent_fg_color;
$selected_bg_color: if($variant=='light', $accent_bg_color, darken($accent_bg_color, 4%));
$borders_color: if($variant=='light', darken($bg_color, 20%), lighten(desaturate(lighten($jet, 4%), 100%), 14%));
$link_color: if($variant=='light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 20%));

$warning_color: $yellow;
$error_color: $red;
$success_color: lighten($green, 5%);
$destructive_color: if($variant=='light', $red, darken($red, 10%));

$osd_fg_color: #eeeeec;
$osd_bg_color: transparentize(lighten($jet, 2%), 0.025);
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);

$insensitive_fg_color: mix($fg_color, $bg_color, 50%);

$hover_bg_color: transparentize($fg_color, 0.9);
$active_bg_color: transparentize($fg_color, 0.8);

$separator_color: if($variant=='light', darken($bg_color, 15%), darken($bg_color, 6%));

$tooltip_bg_color: transparentize(mix($selected_bg_color, black, 95%), 0.05);
$tooltip_fg_color: $selected_fg_color;
$tooltip_border_color: #d0d0d0;

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

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

$panel_bg: darken($bg_color, if($variant=='light', 6%, 2%));
$panel_fg: $fg_color;

$entry_bg: if($variant=='light', $base_color, lighten($base_color, 0%));
$entry_border: if($variant=='light', #cfd6e6, darken($borders_color, 0%));

$button_bg: if($variant=='light', lighten($bg_color, 2%), lighten($base_color, 2%));
$button_border: $entry_border;

// Colors used for highlights in places where we don't want to use accents
$noaccent_selected_bg_color: if($variant=='light', transparentize(black, 0.91), transparentize(white, 0.91));
$noaccent_selected_fg_color: $fg_color;

$applet_separator_color: if($variant =='light', darken($bg_color, 15%), rgba(255, 255, 255, 0.12));

$corner_bar_unhighlighted: $applet_separator_color;
$corner_bar_highlighted: if($variant =='light', darken($applet_separator_color, 10%), opacify($applet_separator_color, .1));

// Needed for sass-utils
$progress_bg_color: if($variant=='light', lighten($accent_bg_color, 10%), lighten($accent_bg_color, 5%));
