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


@function shellopacity($c, $a) {
  @return scale-color($c, $alpha: percentage(-1 + $a));
}

// Import key colour-scheme defined at build-time.
@import 'key_colors';

//
// Foreground colors
//

$fg_color: if($nokto == false, #263238, #CFD8DC);
$secondary_fg_color: shellopacity($fg_color, 0.87);
$tertiary_fg_color: shellopacity($fg_color, 0.54);
$insensitive_fg_color: shellopacity($fg_color, 0.28);
$insensitive_secondary_fg_color: shellopacity($secondary_fg_color, 0.28);

$selected_fg_color: #FFFFFF;
$secondary_selected_fg_color: shellopacity($selected_fg_color, 0.87);


//
// OSD Foreground colors
//

$osd_fg_color: #CFD8DC;
$osd_secondary_fg_color: shellopacity($osd_fg_color, 0.87);
$osd_tertiary_fg_color: shellopacity($osd_fg_color, 0.54);

$insensitive_osd_fg_color: shellopacity($osd_fg_color, 0.28);
$insensitive_osd_secondary_fg_color:
  shellopacity($osd_secondary_fg_color, 0.28);


//
// Background colors
//

$bg_color: if($nokto == false, mix(#FFFFFF, #ECEFF1, 75%),
                               #263238);
$base_color: if($nokto == false, #FFFFFF,
                                 mix(#263238, #37474F, 85%));
$secondary_base_color: mix($base_color, $bg_color, 50%);
$secondary_dark_color: if($nokto == false, mix(#FFFFFF, #ECEFF1, 60%),
                                           mix(#263238, #000000, 95%));
$light_color: if($nokto == false, $base_color,
                                  mix(#263238, #37474F, 50%));

$fill_color: shellopacity($fg_color, 0.25);
$semi_fill_color: shellopacity($fg_color, 0.12);
$hidden_fill_color: rgba(0, 0, 0, 0.01);
$menuentry_hidden_fill_color: if($nokto == false, rgba(255, 255, 255, 0.01),
                                                  rgba(0, 0, 0, 0.01));

$selected_bg_color: $key_selection_color;

$outline_fill_color: shellopacity($fg_color, 0.2);
$insensitive_outline_fill_color: shellopacity($outline_fill_color, 0.28);


//
// OSD Background colors
//

$osd_bg_color: mix(#263238, #000000, 90%);

$osd_fill_color: shellopacity($osd_fg_color, 0.25);
$osd_semi_fill_color: shellopacity($osd_fg_color, 0.12);

$osd_indicator_color: $selected_bg_color;

$osd_outline_fill_color: shellopacity($osd_fg_color, 0.2);
$insensitive_osd_outline_fill_color:
  shellopacity($osd_outline_fill_color, 0.28);


//
// Accent colors
//

$accent_color: $key_accent_color;
$accent_label_color: if($nokto == false,
                        mix($key_accent_color, $fg_color, 80%),
                        mix($key_accent_color, $fg_color, 60%));
$secondary_accent_color: shellopacity($accent_color, 0.87);
$secondary_accent_label_color: shellopacity($accent_label_color, 0.87);
$insensitive_accent_label_color: shellopacity($accent_label_color, 0.28);

$accent_fill_color: shellopacity($accent_color, 0.25);
$accent_semi_fill_color: shellopacity($accent_color, 0.12);
$accent_outline_fill_color: shellopacity($accent_color, 0.2);

$inverted_accent_label_color: mix($key_accent_color, $osd_fg_color, 60%);
$inverted_secondary_accent_label_color:
  shellopacity($inverted_accent_label_color, 0.87);


//
// Misc colors
//

$borders_color: if($nokto == false, shellopacity(#000000, 0.09),
                                    shellopacity(#000000, 0.13));
$solid_light_borders_color: if($nokto == false, #E5E9EC, #212B30);
$borders_edge: shellopacity(#000000, 0.05);
$top_hilight: $borders_edge;
$borders_highlight: shellopacity(#FFFFFF, 0.07);
$menu_highlight: if($nokto == false,
                    $base_color,
                    mix($secondary_base_color, #FFFFFF, 98%));
$insensitive_borders_color: $borders_color;

$link_color: #03A9F4;
$link_visited_color: #9C27B0;

$link_label_color: if($nokto == false, $link_color,
                                       mix($link_color, $fg_color, 60%));
$link_visited_label_color: if($nokto == false,
                              $link_visited_color,
                              mix($link_visited_color, $fg_color, 60%));

$warning_color: #FF9800;
$error_color: #F44336;
$success_color: #00E676;

$suggested_color: $key_suggestion_color;
$destructive_color: $key_destruction_color;


//
// Panel colors
//

$panel_bg_color: mix(#263238, #000000, 50%);
$panel_transparent_color: shellopacity($panel_bg_color, 0.0);
$panel_hidden_fill_color: shellopacity($panel_bg_color, 0.01);
$panel_secondary_fill_color: shellopacity($panel_bg_color, 0.87);
$panel_tertiary_fill_color: shellopacity($panel_bg_color, 0.54);

