$border_opacity: if($contrast == 'high', .5, .15);
$thin_border_opacity: if($contrast == 'high', .25, .05);
$focus_border_opacity: if($contrast == 'high', 0.8, 0.5);

// Colors from _defaults.scss

$accent_bg_color: gtkcolor(accent_bg_color);
$accent_fg_color: gtkcolor(accent_fg_color);
$accent_color: gtkcolor(accent_color);

$destructive_bg_color: gtkcolor(destructive_bg_color);
$destructive_fg_color: gtkcolor(destructive_fg_color);
$destructive_color: gtkcolor(destructive_color);

$success_bg_color: gtkcolor(success_bg_color);
$success_fg_color: gtkcolor(success_fg_color);
$success_color: gtkcolor(success_color);

$warning_bg_color: gtkcolor(warning_bg_color);
$warning_fg_color: gtkcolor(warning_fg_color);
$warning_color: gtkcolor(warning_color);

$error_bg_color: gtkcolor(error_bg_color);
$error_fg_color: gtkcolor(error_fg_color);
$error_color: gtkcolor(error_color);

$window_bg_color: gtkcolor(window_bg_color);
$window_fg_color: gtkcolor(window_fg_color);

$view_bg_color: gtkcolor(view_bg_color);
$view_fg_color: gtkcolor(view_fg_color);

$headerbar_bg_color: gtkcolor(headerbar_bg_color);
$headerbar_fg_color: gtkcolor(headerbar_fg_color);
$headerbar_border_color: gtkalpha(gtkcolor(headerbar_border_color), $border_opacity);
$headerbar_backdrop_color: gtkcolor(headerbar_backdrop_color);
$headerbar_shade_color: gtkcolor(headerbar_shade_color);

$card_bg_color: gtkcolor(card_bg_color);
$card_fg_color: gtkcolor(card_fg_color);
$card_shade_color: gtkcolor(card_shade_color);

$popover_bg_color: gtkcolor(popover_bg_color);
$popover_fg_color: gtkcolor(popover_fg_color);

$shade_color: gtkcolor(shade_color);
$scrollbar_outline_color: gtkcolor(scrollbar_outline_color);

// Other colors

$border_color: gtkalpha(currentColor, $border_opacity);
$thin_border_color: gtkalpha(currentColor, $thin_border_opacity);
$link_color: $accent_color;
$link_visited_color: gtkmix($accent_color, $view_fg_color, 80%);

$view_hover_color: gtkalpha(currentColor, .07);
$view_active_color: gtkalpha(currentColor, .16);
$view_selected_color: gtkalpha(currentColor, .1);
$view_selected_hover_color: gtkalpha(currentColor, .13);
$view_selected_active_color: gtkalpha(currentColor, .19);

$trough_color: gtkalpha(currentColor, .15);
$trough_hover_color: gtkalpha(currentColor, .2);
$trough_active_color: gtkalpha(currentColor, .25);

$fill_color: $accent_bg_color;
$fill_text_color: $accent_fg_color;

$slider_color: gtkmix(white, $view_bg_color, 80%);
$slider_hover_color: white;

$osd_fg_color: transparentize(white, .1);
$osd_text_color: white;
$osd_bg_color: transparentize(black, 0.3);
$osd_fill_bg_color: transparentize(white, .25);
$osd_fill_fg_color: transparentize(black, .25);
$osd_focus_color: transparentize(white, .5);
$osd_link_color: gtkmix($accent_bg_color, $osd_text_color, 50%);
$osd_link_visited_color: gtkmix($accent_bg_color, $osd_text_color, 75%);

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

$drop_target_color: $accent_bg_color;

$window_outline_color: transparentize(white, .9);

//special cased widget colors
$focus_border_color:  gtkalpha($accent_color, $focus_border_opacity);
$dim_label_opacity: 0.55;
$dimmer_opacity: 0.3;
$disabled_opacity: 0.5;
$strong_disabled_opacity: 0.3;

// High Contrast color overrides
@if $contrast == 'high' {
  $dim_label_opacity: 0.9;
  $dimmer_opacity: 0.8;
  $disabled_opacity: 0.4;

  $trough_color: gtkalpha(currentColor, .3);
  $trough_hover_color: gtkalpha(currentColor, .4);
  $trough_active_color: gtkalpha(currentColor, .5);
  $window_outline_color: transparentize(white, .7);
}
