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

$accent_color: $accent_bg_color;
$light_bg_color: #FAFAFA;
$dark_bg_color: lighten($jet, 6%);

$base_color: if($variant=='light', #ffffff, lighten($jet, 4%));
$bg_color: if($variant =='light', $light_bg_color, $dark_bg_color);
$bg_color2: if($variant == 'light', darken($bg_color, 9%), lighten($bg_color, 6%));
$bg_color3: if($variant == 'light', darken($bg_color, 22%), lighten($bg_color, 14%));
$bg_color4: if($variant == 'light', darken($bg_color, 16%), lighten($bg_color, 9%));
$fg_color: if($variant=='light', $inkstone, $porcelain);
$text_color: $fg_color;

$dim_color: if($variant == 'light', lighten($text_color, 20%), darken($text_color, 20%));

$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%), $bg_color2);
$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_destructive_color: $destructive_color;

$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;
$panel_active_bg: if($variant == 'light', $bg_color2, mix($bg_color3, $accent_color, 80%));

$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', $bg_color3, $bg_color2);
$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;

$corner_bar_unhighlighted: $borders_color;
$corner_bar_highlighted: if($variant =='light', darken($borders_color, 10%), lighten($borders_color, 10%));

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

$radius: 6px;

// Borders and separators
$menus_border_color: transparentize(black, 1.0);
$shadow_color: rgba(0, 0, 0, 0.5);