/*
 * Copyright (C) 2018-2019 Alexandros Theodotou
 *
 * This file is part of Zrythm
 *
 * Zrythm is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Zrythm 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
@define-color bg_color #2D2D2D;
@define-color bg_dark_variant1 #262626;
@define-color bg_dark_variant2 #1F1F1F;
@define-color bg_darker_variant1 #202020;
@define-color bg_darker_variant2 #121212;
@define-color bg_light_variant1 #3A3A3A;
@define-color bg_light_variant2 #343434;
@define-color bg_lighter_variant1 #444444;
@define-color bg_lighter_variant2 #393939;
@define-color dark_variant1 #000000;
@define-color dark_variant2 #030202;
@define-color light_variant1 #656464;
@define-color light_variant2 #989797;
@define-color bright_green #1DDD6A;
@define-color darkish_green #19664c;
@define-color dark_orange #D68A0C;
@define-color z_yellow #F9CA1B;
@define-color bright_orange #F79616;
@define-color z_purple #9D3955;
@define-color matcha_green #2eb398;
@define-color hover_color alpha (white, 0.1);
@define-color selection_color alpha (white, 0.07);
@define-color light_blueish alpha (#1aa3ff, 0.8);
/* see https://coolors.co/ to generate more */

window
{
  -GtkWidget-window-dragging: true;
}

/*paned separator {*/
  /*background-color: alpha(white, 0.80);*/
/*}*/

/*paned separator:hover {*/
  /*background-color: alpha (white, 0.40);*/
/*}*/

/*paned#gpaned-instruments separator {*/
  /*background-color: alpha(white, 0.22);*/
/*}*/

/*#gpaned-instruments separator:hover {*/
  /*background-color: alpha (white, 0.40);*/
/*}*/

browser separator:hover
{
  background-color: @hover_color;
}

browser separator
{
  min-height: 6px;
}

entry:focus
{
  border-color: @bright_orange;
}

spinbutton button:focus
{
  border-left-color: @bright_orange;
}

entry selection
{
  background-color: @z_yellow;
}

treeview.view:hover,
scrollbar,
box.sidebar,
filechooser list
{
  background-color: @bg_light_variant1;
}

/* for editing notebook tab line */
/*notebook > header.top > tabs > tab:hover {*/
  /*box-shadow: inset 0 -2px alpha(#2eb398,0.6), 0 1px alpha(#2eb398,0.6);*/
/*}*/

/*notebook > header.top > tabs > tab:checked {*/
  /*box-shadow: inset 0 -2px #2eb398, 0 1px #2eb398;*/
/*}*/

/*notebook > header.right > tabs > tab:hover {*/
  /*box-shadow: inset 2px 0 alpha(#2eb398,0.6), -1px 0 alpha(#2eb398,0.6);*/
/*}*/

/*notebook > header.right > tabs > tab:checked {*/
  /*box-shadow: inset 2px 0 #2eb398, -1px 0 #2eb398;*/
/*}*/

/*notebook > header.left > tabs > tab:hover {*/
  /*box-shadow: inset -2px 0 alpha(#2eb398,0.6), 1px 0 alpha(#2eb398,0.6);*/
/*}*/

/*notebook > header.left > tabs > tab:checked {*/
  /*box-shadow: inset -2px 0 #2eb398, 1px 0 #2eb398;*/
/*}*/

region,
chord,
marker,
scale-object,
midi-note,
velocity
{
  box-shadow: 2px 2px 6px alpha (black, 0.1);
}

region
{
  border-width: 0px;
}

region:selected,
chord:selected,
marker:selected,
scale-object:selected,
midi-note:selected,
velocity:selected,
automation-point:selected
{
  box-shadow: 2px 2px 10px @selection_color;
  /*border-color: gray;*/
  /*border-width: 1px;*/
  /*border-style: solid;*/
}

.header_notebook button.toggle:not(:checked)
{
  background-color: @bg_darker_variant1;
}

region:hover,
chord:hover,
marker:hover,
scale-object:hover,
midi-note:hover,
velocity:hover,
automation-point:hover,
automation-curve:hover
{
  box-shadow: 2px 2px 10px @hover_color;
}

arranger-playhead
{
  background-color: red;
}

treeview.view:selected
{
  background-color: @z_purple;
}

/* notebook page background */
notebook stack
{
  background-color: @bg_color;
}

tracklist,
ruler,
piano-roll-labels,
window,
filechooser #pathbarbox,
paned
{
background-color: @bg_dark_variant1;
}

left-dock-edge notebook header,
right-dock-edge notebook header,
bot-dock-edge notebook header,
notebook header,
center-dock-bot-box,
center-dock-bot-box toolbar,
tracklist-header,
top-dock-edge,
top-dock-edge toolbar,
top-bar,
top-bar toolbar,
bot-bar,
bot-bar toolbar,
assistant,
buttonbox,
timeline-selection-info,
timeline-toolbar,
piano-roll-selection-info,
piano-roll-toolbar,
browser toolbar,
dialog
{
background-color: @bg_dark_variant2;
}

browser toolbar
{
  padding: 0px;
}

.header_notebook tabs,
.header_notebook header,
.header_notebook toolbar,
home-toolbar,
project-toolbar,
view-toolbar,
help-toolbar,
menubar
{
  background-color: @bg_darker_variant2;
}

home-toolbar separator,
project-toolbar separator,
view-toolbar separator,
help-toolbar separator
{
  background-color: grey;
  margin: 4px;
}

piano-roll-label.highlight_scale
{
  background-color: alpha (#662266, 0.2);
}

piano-roll-label.highlight_chord
{
  background-color: alpha (#BB22BB, 0.2);
}

piano-roll-label.highlight_both
{
  background-color: alpha (#FF22FF, 0.2);
}

/* override button size from theme */
button
{
  min-width: 4px;
  min-height: 4px;
}

button.toggle,
button.popup,
button:not(.flat),
entry
{
  background-color: @bg_light_variant2;
}

button.toggle:hover,
button.popup:hover,
button:hover,
button.flat:hover,
button.text-button:hover,
tooltip.background
{
  background-color: @bg_lighter_variant1;
}

entry selection
{
  color: @bg_lighter_variant1;
}

menu,
popover
{
  background-color: @bg_lighter_variant2;
}

button:not(.record-button):not(.solo-button).toggle:checked,
stackswitcher button:checked,
menuitem:hover
{
  background-color: @dark_orange;
}

button:not(.record-button).toggle:active,
.header_notebook button.toggle:active
{
  background-color: @bright_orange;
}

button.toggle.record-button:checked
{
  background-color: #ED2939;
}

button.toggle.solo-button:checked
{
  background-color: @darkish_green;
}

button.toggle.record-button:active
{
  background-color: #FF2400;
}

button.donate-button
{
  border-radius: 8px;
}

button.toggle.solo-button:active
{
  background-color: @matcha_green;
}

button:not(.toggle):active,
button.flat:not(.toggle):active,
button.text-button:active
{
  background-color: @bright_orange;
}

bot-dock-edge toolbar
{
  background-color: @bg_dark_variant2;
}

arranger-bg,
treeview.view,
timeline-minimap-bg
{
  background-color: @bg_darker_variant1;
}

track:selected,
channel:selected,
region:selected,
chord:selected,
marker:selected,
scale-object:selected,
midi-note:selected
velocity:selected,
automation-point:selected
{
  background-color: @selection_color;
}

channel-slot:selected
{
  background-color: @light_blueish;
}

filechooser button:checked,
filechooser button:active
{
  border-color: @selection_color;
}

track:hover,
region:hover,
chord:hover,
scale-object:hover,
marker:hover,
fader:hover,
channel-slot:hover:not(:selected),
pan:hover,
ruler-playhead:hover,
arranger-playhed:hover,
automation-point:hover
{
  background-color: @hover_color;
}

inspector expander-box,
inspector two-col-expander-box,
modulator-view two-col-expander-box
{
  margin: 4px;
  border-style: solid;
  border-width: 2px;
  border-radius: 6px;
  /* FIXME use predefined colors */
  border-color: #555555;
}

inspector expander-box >button,
inspector two-col-expander-box>button
{
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

channel expander-box>button
{
  /*border-top-left-radius: 6px;*/
  /*border-top-right-radius: 6px;*/
}

channel expander-box
{
  /*margin: 5px;*/
  border-style: none;
  border-width: 2px;
  border-radius: 8px;
  /* FIXME use predefined colors */
  border-color: #BBBBBB;
}

.piano_roll_key_box,
.chord_key
{
  border-style: solid;
  border-bottom-width: 1px;
  border-color: alpha (grey, 0.3);
}

.thick-separator
{
  min-height: 2px;
  min-width: 2px;
}

track-lane,
automation-lane
{
  border-style: solid;
  border-top-width: 2px;
  border-color: alpha (grey, 0.3);
}

.section_heading
{
  font-weight: bold;
  font-size: small;
}

.channel_label
{
  font-size: small;
}

.channel_label_smaller
{
  font-size: smaller;
}

.route_target_selector
{
  padding-left: 1px;
  padding-right: 1px;
}

/* statckswitcher in the inspector */
stackswitcher button image
{
  padding-top: 0px;
  padding-bottom: 0px;
  padding-left: 3px;
  padding-right: 3px;
}

/* button without padding */
.mini-button
{
  padding: 0px;
}
