/*
    This file is part of darktable,
    copyright (c) 2021 Nicolas Auffray

    darktable is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    darktable is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with darktable.  If not, see <http://www.gnu.org/licenses/>.
*/

/* This has been tested with GTK 3.24 on Gnome */

@import url("darktable-elegant-dark.css");

/* Perceptually uniform grey gradient */

/* General */
@define-color selected_bg_color @grey_55; /* legacy stuff */
@define-color border_color @grey_40; /* border, when used */
@define-color bg_color @grey_45; /* general background */
@define-color fg_color @grey_95; /* general text */
@define-color base_color @fg_color; /* legacy stuff */
@define-color text_color @grey_35; /* same */
@define-color disabled_fg_color @grey_65; /* disabled controls */

/* Scroll bars (sliders) */
@define-color scroll_bar_inactive @grey_70;
@define-color scroll_bar_active @grey_90;
@define-color scroll_bar_bg @grey_40;

/* Modules box (plugins) */
@define-color plugin_bg_color @grey_50;
@define-color plugin_fg_color @fg_color;
@define-color plugin_label_color @grey_80;

/* Modules controls (sliders and comboboxes) */
@define-color bauhaus_bg @bg_color;
@define-color bauhaus_fg @fg_color;
@define-color bauhaus_border shade(@plugin_bg_color, 0.5);
@define-color bauhaus_indicator_border @grey_50;
@define-color bauhaus_fill @grey_70;
@define-color bauhaus_bg_hover @grey_65;
@define-color bauhaus_fg_hover @grey_95;
@define-color bauhaus_fg_selected @grey_85;
@define-color bauhaus_fg_disabled alpha(@bauhaus_fg, 0.5);
@define-color bauhaus_fg_insensitive alpha(@bauhaus_fg, 0.5);

/* GTK Buttons and tabs */
@define-color button_border @grey_60;
@define-color button_bg @grey_55;
@define-color button_fg @fg_color;
@define-color button_checked_bg @grey_70;
@define-color button_checked_fg @grey_100;
@define-color button_hover_bg @grey_80;
@define-color button_hover_fg @grey_25;

/* text fields */
@define-color field_bg @grey_45;
@define-color field_fg @grey_95;
@define-color field_active_bg @grey_55;
@define-color field_active_fg @grey_95;
@define-color field_selected_bg @grey_60;
@define-color field_selected_fg @button_checked_fg;
@define-color field_hover_bg @grey_70;
@define-color field_hover_fg @grey_35;

/* Tooltips and contextual helpers */
@define-color tooltip_bg_color @grey_35;
@define-color tooltip_fg_color @grey_80;
@define-color log_fg_color @grey_95;

/* Views */
@define-color darkroom_bg_color @grey_75;
@define-color darkroom_preview_bg_color @grey_65;
@define-color print_bg_color @darkroom_bg_color;
@define-color lighttable_bg_color @darkroom_bg_color;
@define-color lighttable_preview_bg_color @darkroom_preview_bg_color;
@define-color lighttable_bg_font_color @grey_95;

/* Lighttable and film-strip */
@define-color thumbnail_font_color @grey_40;
@define-color thumbnail_bg_color @grey_70;
@define-color thumbnail_fg_color @grey_60;
@define-color thumbnail_selected_bg_color @grey_80;
@define-color thumbnail_hover_bg_color @grey_95;
@define-color thumbnail_hover_fg_color @grey_100;
@define-color thumbnail_localcopy_color @grey_90;

/* Graphs : histogram, navigation thumbnail and some items on tone curve */
@define-color graph_bg @grey_40;
@define-color graph_border @grey_15;
@define-color graph_fg @grey_100;
@define-color graph_fg_active @grey_95;
@define-color graph_grid @grey_30;
@define-color inset_histogram alpha(@grey_95, 0.50);

/* Adjust middle grey picker on levels and rgb levels modules to make it visible */
#picker-grey
{
  color: @grey_70;
}

/* Deactivated switch buttons, make them less visible */
#history-switch:disabled
{
    color: shade(@plugin_label_color, .9);
}

#history-button *
{
  color: shade(@plugin_fg_color, 0.8);
}

/* Adjust color of top shown infos on darkroom */
#log-msg,
#toast-msg
{
  background-color: rgba(110,110,110,0.6);
}

/* Set background on thumbnails hover overlays */
.dt_overlays_hover_extended #thumb_main:hover #thumb_bottom,
.dt_overlays_mixed #thumb_main:hover #thumb_bottom,
.dt_overlays_hover #thumb_main:hover #thumb_bottom
{
  background-image: linear-gradient(rgba(241, 241, 241, 0.7) 0%, rgba(241, 241, 241, 0.7) 90%,rgba(241, 241, 241, 0) 100%);  /* rgb color needs to be set to same color as #thumb_back hover background */
}

/* Set how bottom infos are rendered on always and always extended overlays modes in culling and preview modes */
.dt_overlays_always#culling #thumb_bottom,
.dt_overlays_always_extended#culling #thumb_bottom,
.dt_overlays_always#preview #thumb_bottom,
.dt_overlays_always_extended#preview #thumb_bottom
{
  background-image: linear-gradient(rgba(226, 226, 226, 0.2) 0%, rgba(226, 226, 226, 0.1) 5%, rgba(226, 226, 226, 0) 100%);
}

.dt_overlays_always#culling #thumb_main:hover #thumb_bottom,
.dt_overlays_always_extended#culling #thumb_main:hover #thumb_bottom,
.dt_overlays_always#preview #thumb_main:hover #thumb_bottom,
.dt_overlays_always_extended#preview #thumb_main:hover #thumb_bottom
{
  background-image: linear-gradient(rgba(246, 246, 246, 0.4) 0%, rgba(246, 246, 246, 0.2) 5%, rgba(226, 226, 226, 0) 100%);
}

/* Make inactive stars more discrete when not hovered */
.dt_overlays_always #thumb_star,
.dt_overlays_always_extended #thumb_star,
.dt_overlays_mixed #thumb_star,
.dt_overlays_hover_block #thumb_star
{
  color: shade(@thumbnail_font_color, 1.5);
}
