/*
  This file is part of RawTherapee.

  Copyright (c) 2016-2017 TooWaBoo
  Version 2.58

  RawTherapee 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.

  RawTherapee 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 RawTherapee.  If not, see <http://www.gnu.org/licenses/>.
*/

/*** Change me *** rgb(red,green,blue) *** allowed values from 0 to 255 for each color ***/

@define-color accent-color rgb(35,99,166);              /*** Active color for Lists, Menu, Borders ... * Default: rgb(35,99,166) ***/
@define-color text-hl-color rgb(210,210,210);           /*** Active text color * Default: rgb(210,210,210) ***/

@define-color bg-highlighted-text-color rgb(35,99,166); /*** Highlighted text color background* Default: rgb(35,99,166) ***/
@define-color highlighted-text-color rgb(210,210,210);  /*** Highlighted text color * Default: rgb(210,210,210) ***/

@define-color bg-image rgb(75,75,75);                   /*** Image area & File Browser background * Default: rgb(70,70,70) ***/

@define-color accent-color2 rgb(35,99,166);             /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/
@define-color accent-color4 rgb(115,115,115);           /*** Slider knob * Default: rgb(115,115,115) ***/

@define-color accent-color3 rgb(35,99,166);             /*** Selected thumbnail background color * Default: rgb(35,99,166) ***/
@define-color text-hl-color3 rgb(210,210,210);          /*** Selected thumbnail text color * Default: rgb(210,210,210) ***/

/*** Change me end *****************************************************************************/

@define-color bg-light-grey rgb(95,95,95);
@define-color bg-grey rgb(75,75,75);
@define-color bg-dark-grey rgb(40,40,40);

@define-color bg-button-hover rgba(0,0,0,.25);
@define-color bg-button-active rgba(0,0,0,.60);

@define-color winHeaderbar rgb(55,55,55);
@define-color winTitle rgb(190,190,190);

@define-color bg-tooltip rgb(185,185,185);
@define-color border-tooltip rgb(40,40,40);
@define-color text-tooltip rgb(40,40,40);
/***********************************************/
@define-color text-color rgb(186,186,186);
@define-color text-tbEntry rgb(192,192,192);
@define-color border-color rgba(255,255,255,.30);
@define-color bg-list-hover rgb(50,50,50);
@define-color bg-scale-entry rgba(0,0,0,.14);
@define-color bg-button-border rgba(0,0,0,.60);
@define-color bg-entry-border rgba(0,0,0,.40);
@define-color view-grid-border rgba(255,255,255,0.15);
@define-color headline-big rgb(195,195,195);
@define-color headline-hl rgb(230,230,230);
@define-color headline-frame rgb(215,215,215);
/*** New Color Variable v2.53 ************************************************************************/
@define-color fg-disabled rgb(128,128,128);
@define-color bg-tb-spinbutton shade(@bg-grey, 1.33);
/***********************************************************************************************/

* {
    color: @text-color;
    text-shadow: none;
    outline-style: none; /* removes the ugly dashed focus line */
    border-image: none;
    transition: none;
}

*:disabled {
    color: @fg-disabled;
}

#ToolPanelNotebook {
    min-width: 24.08334em;
}
#HistoryPanel {
    min-width: 18em;
}

window.background {
    background-color: @bg-light-grey;
}
window > box {
    padding: 0.41667em;
}
dialog {
    background-color: @bg-grey;
    border-radius: 0;
    -GtkDialog-button-spacing: 6;
    -GtkDialog-content-area-spacing: 4;
    -GtkDialog-content-area-border: 0;
    -GtkDialog-action-area-border: 0;
}
dialog > box {
    padding: 0.66667em;
}
messagedialog {
    background-color: @bg-light-grey;
    border-radius: 0;
}
tooltip {
    background-color: @bg-tooltip;
    border: 0.08334em solid @border-tooltip;
    border-radius: 0.33334em;
    padding: 0;
    margin: 0;
    box-shadow: none;
}
tooltip label {
    color: @text-tooltip;
}

paned {
    background-color: @bg-light-grey;
}

/*?win*/
#PlacesPaned {
    margin: 0;
}

undershoot {
    background-image: none; /* removes the dashed scrollbar line */
}

label {
    padding: 0;
    margin: 0;
}

.drawingarea:not(.slider) {
    background-color: @bg-dark-grey;
}

/*** Frames ************************************************************************************/
frame {
    border: none;
    padding: 0;
    margin: 0;
    background-color: transparent;
    min-height: 0;
    min-width: 0;
    border-radius: 0;
    box-shadow: none;
}

#BatchQueueButtonsMainContainer frame,
#MyExpander frame,
dialog frame {
    margin: 0.16667em 0.5em;
}
/* affects selection list*/
entry > window > frame,
filechooser frame {
    margin: 0;
}

#PlacesPaned frame {
    margin: -8px 0 0;
}

frame > border {
    padding: 0;
    border-radius: 0;
    border: none;
    background-color: transparent;
    margin: 0;
    min-height: 0;
    min-width: 0;
    box-shadow: none;
}

#BatchQueueButtonsMainContainer > frame > border,
#MyExpander frame > border,
dialog frame > border {
    padding: 0.5em;
    border-radius: 0;
    border: 0.08334em solid @border-color;
    background-color: transparent;
    margin: 0 -0.5em;
}
/* affects selection list*/
entry > window > frame> border,
filechooser > frame > border {
    padding: 0;
    border: none;
    background-color: transparent;
    margin: 0;
}
#PrefNotebook box > frame > border {
    padding-top: 0;
    padding-bottom: 0.25em;
}

#BatchQueueButtonsMainContainer frame > label,
#ToolPanelNotebook frame > label,
dialog frame > label {
    margin: 0;
    padding: 0.16667em 0.5em;
}
#BatchQueueButtonsMainContainer frame > border {
    margin-bottom: 0.83334em;
}
#BatchQueueButtonsMainContainer frame:nth-child(3) > border {
    padding-left: 0.91667em;
}

#BatchQueueButtons {
    margin-top: 0.66667em;
}

frame > label {
    margin: 0;
    padding: 0.5em 0;
    color: @headline-frame;
}
frame > checkbutton label{
    color: @headline-frame;
}
/*** end ***************************************************************************************/

/*** Lists & Views *****************************************************************************/
textview.view, treeview.view {
    background-color: @bg-dark-grey;
    border-color: @view-grid-border;
    padding: 0.16667em;
    margin: 0;
}
textview:hover, treeview:hover {
    background-color: @bg-list-hover;
}
textview:selected, treeview:selected {
    color: @text-hl-color;
    background-color: @accent-color;
    border-top-color: transparent;
}

#RightNotebook > stack > :nth-child(1) treeview {
    border: 0.08334em solid @bg-dark-grey;
    border-bottom: none;
}

#PlacesPaned > box:nth-child(1) treeview {
    padding: 0.08334em 0 0.08334em 0.5em;
    -gtk-icon-style: symbolic;
}

#HistoryPanel {
    margin-top: 0.5em;
}
#HistoryPanel > border {
    margin-top: 1.75em;
}
#HistoryPanel > label {
    margin: 0 0 -1.33334em 0;
    padding: 0;
}

#Snapshots > border {
    min-height: calc(6.5em + 36px);
}
#Snapshots > label {
    margin-bottom: -4px;
}
#Snapshots button {
    margin-top: -8px;
    margin-bottom: -4px;
}
#Snapshots > box > :nth-child(1) {
    margin-bottom: 0.41667em;
}

#PlacesPaned > box:nth-child(3) > box:nth-child(2),
#PlacesPaned > box:nth-child(1) > :nth-child(1),
#HistoryPanel > border,
#Snapshots > box > :nth-child(1) {
    background-color: @bg-dark-grey;
    border: 0.08334em solid @bg-dark-grey;
}

/*Corrects the space of the snapshot view to the paned separator*/
#Snapshots {
    margin-top: -0.33334em;
}
/**/

/*** end ***************************************************************************************/

/*** Navigator *********************************************************************************/
#Navigator .drawingarea {
    border-top: 0.41667em solid @bg-dark-grey;
    border-bottom: 0.25em solid @bg-dark-grey;
}
#Navigator {
    background-color: @bg-dark-grey;
    padding-bottom: 0.25em;
}
#Navigator box label {
    padding: 0.16667em 0;
}

/*** end ***************************************************************************************/

/*** Load - Save dialog ************************************************************************/
filechooser * {
    box-shadow: none;
}
filechooser #pathbarbox {
    border: none;
    background-color: @bg-dark-grey;
    padding: 0.5em;
}

filechooser box {
    border-color: transparent;
}

filechooser > box > paned > box {
    border: 0.08334em solid @bg-dark-grey;
    background-color: @bg-dark-grey;
}
filechooser placessidebar {
    padding: 0 0.08334em;
    background-color: @bg-dark-grey;
}

filechooser list {
    background-color: @bg-dark-grey;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: -3px 0 0;
}
filechooser list row {
    margin: 0;
    padding: 0;
    min-height: calc(1.41667em + 8px);
}
filechooser list row label{
    margin: 0;
    padding: 0;
}
filechooser list row:hover {
    background-color: @bg-list-hover;
}
filechooser list row:selected label,
filechooser list row:selected {
    background-color: @accent-color;
    color: @text-hl-color;
}
/*** end ***************************************************************************************/

/*** Histogram *********************************************************************************/
#HistogramPanel {
    margin: -2px 0;
    border: none;
}
#HistogramArea,
#HistogramRGBArea {
    border: 0.08334em solid @bg-dark-grey;
    background-color: @bg-dark-grey;
}

#fullButton,
#histButton {
    padding: 0.47em 0.41667em;
    margin: 0;
    border-color: @bg-light-grey;
    border-style: solid;
    border-width: 0 0 0 0.08334em;
    background-color: @bg-dark-grey;
    background-image: none;
    box-shadow: none;
    min-height: 0;
    min-width: 0;
    border-radius: 0;
}
#fullButton {
    padding: 0.47em 0.41667em 0.58334em;
}
#EditorLeftPaned #fullButton,
#EditorLeftPaned #histButton {
    border-width: 0 0.08334em 0 0;
}
/*** end ***************************************************************************************/

/*** Separator *********************************************************************************/
separator {
    background-color: transparent;
}
grid separator.horizontal, box separator.horizontal {
    margin: 0.16667em 0;
    padding: 0;
}
grid separator.vertical, box separator.vertical {
    margin: 0 0.25em;
    padding: 0;
}

#PlacesPaned .view.separator,
filechooser separator,
dialog separator {
    background-color: @border-color;
}
popover separator:not(:only-child) {
    margin: 0 0.5em;
    background-color: @border-color;
}

paned.horizontal > separator {
    background-color: transparent;
    min-width: 0.41667em;
    border-left: 0.25em solid @bg-light-grey;
    border-right: 0.25em solid @bg-light-grey;
    margin: 0 -0.25em;
    padding: 0;
}

paned.vertical > separator {
	background-image: image(@bg-dark-grey);
    background-color: @bg-light-grey;
    min-height: 0.5em;
    border-top: 1px solid @bg-light-grey;
    border-bottom: 1px solid @bg-light-grey;
    margin: 0.25em 0 0;
    padding: 0.2em 0 0;
}

dialog paned.horizontal > separator {
    background-color: @bg-grey;
    border-color:  @bg-grey;
    min-width: 0.33334em;
}

menu separator {
    background-color: @view-grid-border;
    margin: 0.25em 0.5em;
}

#Navigator separator {
    background-color: @view-grid-border;
    margin: 0;
    padding: 0;
}

#EditorTopPanel separator,
#IopsPanel separator,
#FileBrowser separator {
    background-color: shade(@bg-light-grey,.75);
    margin-top: 0.33334em;
    margin-bottom: 0.33334em;
}

#MyExpander separator {
    background-color: @view-grid-border;
    margin: 0.33334em 0;
}

#PlacesPaned .view.separator {
    color: @border-color;
}
/*** end****************************************************************************************/

/*** PartialPaste ******************************************************************************/
#PartialPaste {
    border-bottom: 0.08334em solid @border-color;
    border-top: 0.08334em solid @border-color;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

#PartialPaste separator.vertical {
    margin: 0 0.33334em;
    padding: 0;
}

#PartialPaste separator { /* Struggles with #PartialPasteHeaderSep */
    background-color: @border-color;
    margin: 0.16667em 0.5em 0.16667em 1.16667em;
}
#PartialPasteHeaderSep.horizontal {
    background-color: rgb(192,192,192);
    margin: 0.16667em 0.5em;
}

#PartialPasteHeader label {
    color: @headline-big;
    font-weight: bold;
}
#PartialPasteHeader {
    margin: 0.5em 0 0 0;
    padding: 0;
}
/*** end ***************************************************************************************/

/*** Scrollbar *********************************************************************************/
scrollbar {
    background-color: rgba(0,0,0,.40);
    border: none;
    margin: 0;
    padding: 0;
}
scrollbar slider {
    background-color: @text-color;
    padding: 0;
    margin: 0;
    border-color: transparent;
    border-style: solid;
    border-radius: 1em;
}

scrollbar:not(.overlay-indicator) {
    border-color: @bg-dark-grey;
    border-style: solid;
    background-color: rgba(0,0,0,.30);
}
scrollbar:not(.overlay-indicator).horizontal {
    border-width: 0 0.08334em 0.08334em 0.08334em;
}
scrollbar:not(.overlay-indicator).vertical {
    border-width: 0.08334em 0.08334em 0.08334em 0;
}
scrollbar:not(.overlay-indicator) slider {
    background-color: shade(@text-color, .9);
}

scrollbar:not(.overlay-indicator).horizontal slider,
scrollbar.horizontal.hovering slider {
    min-height: 0.5em;
    min-width: 2em;
    border-width: 0.25em;
}
scrollbar:not(.overlay-indicator).horizontal.fine-tune slider,
scrollbar.horizontal.hovering.fine-tune slider {
    min-height: calc(0.5em - 2px);
    border-width: calc(0.25em + 1px);
    margin: 0 -1px;
}
scrollbar.horizontal.overlay-indicator:not(.hovering) slider {
    min-width: 2em;
    min-height: 0.25em;
    border-width: 0.08334em;
    border-radius: 0.25em;
    margin: 0 0.16667em;
}

scrollbar:not(.overlay-indicator).vertical slider,
scrollbar.vertical.hovering slider {
    min-height: 2em;
    min-width: 0.5em;
    border-width: 0.25em;
}
scrollbar:not(.overlay-indicator).vertical.fine-tune slider,
scrollbar.vertical.hovering.fine-tune slider {
    min-width: calc(0.5em - 2px);
    border-width: calc(0.25em + 1px);
    margin: -1px 0;
}
scrollbar.vertical.overlay-indicator:not(.hovering) slider {
    min-width: 0.25em;
    min-height: 2em;
    border-width: 0.08334em;
    border-radius: 0.5em;
    margin: 0.16667em 0;
}

scrollbar:not(.overlay-indicator) slider:hover,
scrollbar slider:hover {
    background-color: shade(@accent-color2,1.12);
}

/* Scrollbar stuck workaround */
scrollbar:not(.overlay-indicator):hover {
    min-width: 1px;
}

/*** end ***************************************************************************************/

/*** Scale**************************************************************************************/
scale {
    padding: 0;
    min-height: 1.83334em;
    margin: 0 0.25em;
}

scale slider {
    /* Slider size is min-width x min-height; margin have to be half of those values, but negative */
    min-width: 1em;
    min-height: 1em;
    margin: calc(-0.33334em - 1px);
    border-radius: 0.83334em;
    background-image: linear-gradient(to bottom, shade (@accent-color4,1.15), shade (@accent-color4,.85));
    border: 0.08334em solid @bg-button-border;
    box-shadow: none;
}
scale slider:hover {
    background-image: linear-gradient(to bottom, shade (@accent-color4,1.25), shade (@accent-color4,.95));
}

scale trough {
    margin: 0.5em; /* has to be half of "scale slider / min-width min-height*/
    background-color: @bg-scale-entry;
    border: 0.08334em solid @bg-button-border;
    box-shadow: inset 0 0.08334em rgba(255, 255, 255, 0.11), 0 0.08334em rgba(242, 242, 242, 0.11);
    border-radius: 0.5em;
}
scale:not(:disabled) trough highlight {
    background-color: @accent-color2;
    border: 0.08334em solid @bg-button-border;
    box-shadow: inset 0 0.08334em shade(@accent-color2, 1.3);
    border-radius: 0.5em;
}

scale.fine-tune trough {
    margin: calc(0.5em - 1px);
    padding: 1px;
}
scale.fine-tune trough highlight {
    margin: -2px;
}

scale:disabled slider,
scale:disabled trough {
    background-color: shade(@bg-grey,.9);
    box-shadow: none;
    background-image: none;
}

/*** end ***************************************************************************************/

/*** Progressbar *******************************************************************************/
progressbar.vertical {
    min-width: 0;
    min-height: 9em;
}
progressbar.vertical text {
    color: transparent;
}

progressbar.vertical trough {
    min-width: 0.5em;
    background-color: transparent;
    border-width: 0;
}
progressbar.vertical trough progress {
    min-width: 0.5em;
    margin: 0 -1px;
    background-color: @accent-color2;
    border-width: 0;
    border-radius: 0.5em;
}

progressbar.horizontal trough {
    min-height: 0.41667em;
    background-color: transparent;
    border: none;
    border-radius: 0.5em;
    margin-top: 0.58334em;
}
progressbar.horizontal trough progress {
    min-height: 0.41667em;
    margin: -1px 0;
    background-color: @accent-color2;
    border: none;
    border-radius: 0.5em;
}

#IopsPanel progressbar.horizontal trough {
    min-height: 0.5em;
    background-color: @bg-scale-entry;
    border: 0.08334em solid @bg-button-border;
    margin-top: 0.25em;
}
#IopsPanel progressbar.horizontal trough progress {
    min-height: 0.5em;
    margin: -1px 0;
    background-color: @accent-color2;
    border: none;
    border-radius: 0.5em;
}

/*** end ***************************************************************************************/

/*** Notebook **********************************************************************************/
notebook,
notebook header,
notebook tabs,
notebook tab,
notebook stack {
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    min-width: 0;
    min-height: 0;
}
notebook header {
    background-color: @bg-dark-grey;
    padding: 0 0.41667em;
}
notebook header.left {
    padding: 0.41667em 0;
}
notebook tabs {
    background-color: transparent;
}
notebook header tab {
    background-color: transparent;
    margin: 0.41667em 0.25em;
    padding: 0 0.33334em;
}
notebook header.left tab {
    margin: 0.25em 0.41667em;
    padding: 0.33334em 0;
}
notebook header tab > grid > image {
    min-height: 2.33334em;
    min-width: 0;
    padding: 0 0.16667em 0 0;
    margin: 0;
}
notebook header.left tab > grid > image {
    min-height: 0;
    min-width: 2.33334em;
    padding: 0.16667em 0 0;
}
notebook header tab label {
    margin: 0.33334em;
}
notebook header tab:hover label {
    color: @headline-hl;
}
notebook header tab:checked {
    box-shadow: 0 0.25em @accent-color2;
}
notebook header.left tab:checked {
    box-shadow: 0.25em 0 @accent-color2;
}
notebook > header > tabs > arrow {
    background-color: transparent;
    border-radius: 0.2em;
    min-width: 0;
    min-height: 0;
    padding: 0 0.16667em;
    margin: 0.5em 0;
}
notebook > header.left > tabs > arrow {
    padding: 0.16667em 0;
    margin: 0 0.5em;
}
notebook > header > tabs > arrow:hover {
    background-color: rgba(255,255,255,.1);
}
notebook > header > tabs > arrow:active {
    background-color: transparent;
}

notebook stack {
    background-color: @bg-light-grey;
}
dialog notebook stack {
    background-color: @bg-grey;
}

/*?win*/
#MainNotebook > stack {
    padding: 0.41667em;
}

#MainNotebook > stack > :nth-child(2) > box:nth-child(3) {
    margin-top: 0.41667em;
}


/* Adds a line on top of the notebook as a separtor for the titlebar (only on CSD) */
dialog.csd #PrefNotebook > header,
dialog.csd #AboutNotebook > header,
window.csd:not(.fullscreen) #MainNotebook > header.top {
    border-top: 0.083334em solid rgba(200,200,200,.18);
}
/**/

#ToolPanelNotebook > header tabs {
    margin-bottom: 0.33334em;
}

#ToolPanelNotebook > header tab {
    margin-left: 0;
    margin-right: 0;
    padding: 0 0.33334em;
}
#ToolPanelNotebook > header tab + tab {
    margin-left: 0.33333em;
}

#ToolPanelNotebook > header tab image{
    min-height: 2.5em;
    min-width: 2em;
    padding: 0;
    margin: 0;
}

#RightNotebook > header {
    margin: 0 0.41667em 0 0;
}
#RightNotebook > stack {
    background-color: @bg-grey;
    padding: 0;
}

#RightNotebook > stack > :nth-child(1) > * > box,
#RightNotebook > stack > :nth-child(4) > * > box {
    padding: 0.5em;
    border: 0.08334em solid @bg-entry-border;
}

#PrefNotebook header {
    margin: -0.66667em -0.66667em 0.33334em;
}
#AboutNotebook header {
    margin: -0.66667em -0.66667em 0.66667em;
}

#AboutNotebook stack text {
    background-color: @bg-dark-grey;
}

/* All tool panels have a frame except for Meta which unlike the rest is a notebook itself.
 * So we use CSS to make it look like a frame. */

#MetaPanelNotebook header {
    background-color: @bg-grey;
    padding: 0.33334em;
    margin: 0 0.5em 0;
}
#MetaPanelNotebook > header > tabs {
    background-color: @bg-dark-grey;
    padding-left: 0.33334em;
}
#MetaPanelNotebook > header tab label{
    margin: 0.08334em;
}

#MetaPanelNotebook > stack > box {
    border: none;
    background-color: @bg-grey;
    border-radius: 0;
    border-top-style: none;
    padding: 0 0.33334em 0.25em;
    margin: 0 0.5em -0.5em;
}
#MetaPanelNotebook > stack > box:nth-child(1) > scrolledwindow {
    margin: 0 0 0.33334em;
    padding: 0;
}

#MetaPanelNotebook > stack > box:nth-child(2) > scrolledwindow > viewport.frame {
    padding: 0 0 0 1em;
}

#MetaPanelNotebook separator {
    background-color: @border-color;
    margin: 0.16667em 0;
}
#MetaPanelNotebook entry, #MetaPanelNotebook button, #MetaPanelNotebook combobox button {
    margin-top: 0;
    margin-bottom: 0;
    min-height: 1.66667em;
    min-width: 0.83334em;
}
#MetaPanelNotebook entry {
    padding: 0 0.33334em;
    background-color: @bg-dark-grey;
    margin: 0;
    border-radius: 0;
}

#MetaPanelNotebook > stack > box:nth-child(2) > scrolledwindow scrolledwindow {
    background-color: @bg-dark-grey;
    padding: 0;
    margin: 0;
}
#MetaPanelNotebook .view {
    border: 0.08334em solid @bg-dark-grey;
    padding: 0.16667em;
    margin: 0;
}
#MetaPanelNotebook textview.view {
    background-color: @bg-dark-grey;
    padding: 0.08334em 0.33334em;
    margin: 0;
}
#MetaPanelNotebook text {
    background-color: transparent;
    padding: 0;
    margin: 0;
}

#MetaPanelNotebook combobox button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
}
#MetaPanelNotebook combobox + button,
#MetaPanelNotebook combobox + button + button {
    margin-left: 0.16667em;
    min-width: 1.66667em;
}
#MetaPanelNotebook > stack > box > grid > button {
    margin-top: 0.08334em;
    margin-bottom: 0.08334em;
    min-height: 2.16667em;
}

#MetaPanelNotebook label {
    padding: 0.08334em 0;
}

/*** end ***************************************************************************************/

/*** File Browser ******************************************************************************/
#FileCatalog {
    background-color: @bg-image;
    border: 0.08334em solid @bg-dark-grey;
}
#FileCatalog:selected {
    background-color: @accent-color3;
    color: @text-hl-color3;
}

/*?win*/
#FileBrowser {
    padding: 0;
    margin: 0;
}

#ToolBarPanelFileBrowser {
    margin: -2px -1px;
    min-height: 0;
    min-width: 0;
    padding: 0.41667em 0;
}

#ToolBarPanelFileBrowser > box > button,
#ToolBarPanelFileBrowser > button {
    margin: 0 0.08334em;
}
#ToolBarPanelFileBrowser > box > box > button {
    min-height: 0.91667em;
    min-width: 1.33333em;
    padding: 0;
    margin: 0.16667em 0 0 0;
    border: none;
    background-color: transparent;
    background-image: none;
    box-shadow: none;
}

#ToolBarPanelFileBrowser entry + button.flat,
#FileBrowser entry + button.flat {
    min-height: 1.66667em;
    min-width: 1.66667em;
    margin: 0 0 0 -1.66667em;
    border-radius: 0 0.2em 0.2em 0;
    border: 0.08334em solid transparent;
    padding: 0;
}
#ToolBarPanelFileBrowser entry,
#FileBrowser entry {
    min-height: 1.66667em;
    min-width: 12em;
    margin: 0 -2px 0 0;
    padding: 0 2em 0 0.33334em;
}
#ToolBarPanelFileBrowser label,
#FileBrowser label {
    margin: 0 0.33334em 0 0.5em;
}
/*** end ***************************************************************************************/

/*** Image Editor ******************************************************************************/
#EditorRightPaned {
    margin: 0;
}

#BeforeAfterContainer {
    background-color: @bg-grey;
    border: 0.08334em solid @bg-dark-grey;
    border-radius: 0;
    padding: 0;
    margin: 0.41667em 0;
}
#BeforeAfterContainer > box:nth-child(2) > box:nth-child(2),
#BeforeAfterContainer > box:nth-child(1) > box:nth-child(2){
    border-top: 0.08334em solid @bg-dark-grey;
}
#BeforeAfterContainer > box:nth-child(2){
    border-left: 0.08334em solid @bg-dark-grey;
}

#BeforeAfterContainer label {
    min-height: 2.41667em;
    padding: 0 0.5em;
}
/* Small Lock Button */
#BeforeAfterContainer button {
    min-height: 1.66667em;
    min-width: 1.75em;
    margin: 0.25em;
    padding: 0 0 0 0.08334em;
}
/**/

#EditorTopPanel {
    margin: -2px -2px;
    padding: 0;
    min-height: 0;
}
#EditorTopPanel button {
    margin: 0 0.08334em;
    min-height: 2.16667em;
    min-width: 2.16667em;
}
/* Removes margin from the last button. Otherwise the filmstrip will cut of the right border. */
#EditorTopPanel :last-child > button:last-child {
    margin-right: 0;
}

#EditorTopPanel > box:nth-child(9) > button.image-button {
    min-width: 0;
    padding-left: 0.25em;
    padding-right: 0.25em;
}

/*Button editor bottom*/
#EditorZoomPanel label {
    min-width: 4em;
    margin: 0;
}
#IopsPanel button.Left image {
    padding: 0 2px 0 3px;
}
#EditorZoomPanel button {
    margin-left: 0.08334em;
    margin-right: 0.08334em;
}
/*** end ***************************************************************************************/

/*** Toolbox ***********************************************************************************/
#ToolPanelNotebook stack {
    background-color: @bg-dark-grey;
    padding: 0 0 0.5em 0;
}
/*Curve spinbutton background */
#MyExpander flowbox > flowboxchild {
  background-color: transparent;
}
/**/
#MyExpander .drawingarea:not(.slider) {
    border: 0.08334em solid @bg-light-grey;
}
#MyExpander .slider,
#MyExpander .drawingarea:nth-child(2) {
    background-image: linear-gradient(to bottom, shade (@accent-color4,1.15), shade (@accent-color4,.85));
    background-color: @accent-color4;
    border: 0.08334em solid rgb(15,15,15);
}
#MyExpander .drawingarea:disabled {
    background-color: shade(@bg-grey,.85);
    border-color: @bg-dark-grey;
    background-image: none;
}
#ThresholdAdjuster {
    margin: 0.08334em 0 0.16667em 0;
}

#ToolPanelNotebook scrolledwindow viewport.frame {
    padding: 0 0.56em;
}
/* #MyExpander.withScrollbar {
    padding: 0 6px;
}
 */

#MyExpander {
    margin: 0;
    padding: 0;
}
#ExpanderBox > box, #ExpanderBox > grid {
    background-color: @bg-grey;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0.5em;
}

    /* Sub-tool (MyExpander) */
#ExpanderBox2 > box, #ExpanderBox2 > grid {
    background-color: transparent;
    border: 0.08334em solid @border-color;
    border-radius: 0;
    margin: 0;
    padding: 0.5em;
}

#MyExpanderTitle > box {
    margin: 0;
    padding: 0.33334em 0;
}

#MyExpanderTitle label {
    color: @headline-big;
    padding: 0;
    margin: 0 0.25em 0 0.5em;
}

#MyExpanderTitle:hover label {
    color: @headline-hl;
}
/*** end ***************************************************************************************/

/*** Context & popups menus *****************************************************************************/
.popup > decoration {
    background-image: none;
    border-radius: 0;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 0.25em 0.75em 0.08334em rgba(0, 0, 0, 0.50), 0 0 0 0.08334em @bg-dark-grey;
}

menu {
    background-color: @bg-dark-grey;
    border: 0.08334em solid @accent-color;
    padding: 0.08334em;
    margin: 0;
}
menu > .top,
menu > .top:hover,
menu > .bottom,
menu > .bottom:hover {
    background-color: transparent;
    border: none;
    padding: 0.5em;
    min-height: 1.5em;
}

menuitem {
    padding: 0 0.33334em;
    margin: 0.08334em;
    min-height: 2em;
}
menuitem:hover {
    background-color: @accent-color;
}
menuitem:hover > * > *,
menuitem:hover > * {
    color: @text-hl-color;
}

menu image {
    min-height: 2em;
    padding: 0;
    margin: 0 0.33334em 0 0;
}

/*** Selection popup list (used in filechooser) ***/
entry > window > frame {
    background-color: @bg-dark-grey;
}
entry > window > frame > border {
    background-color: @bg-dark-grey;
    padding: 0.08334em;
    border: 0.08334em solid @accent-color;
}
entry > window > frame > border {
    margin: 0.08334em;
}
/* end */

/*** end ***************************************************************************************/

/*** Popover *** Context menu filechooser ******************************************************/

popover.background {
    background-color: @bg-dark-grey;
    border: 0.08334em solid  @accent-color;
    border-radius: 0;
    padding: 0;
    margin: 0;
	box-shadow: 0 1px 6px 1px rgba(0, 0, 0, 0.5), 0 0 0 1px @bg-dark-grey;
}
popover.background > box {
    padding: 0;
    margin: -9px;
}
popover.background modelbutton {
    min-height: 2em;
    padding: 0 0.41667em;
    margin: 0;
    border-radius: 0;
}

popover.background label {
    margin-right: 0.5em;
}
popover.background modelbutton:hover label,
popover.background modelbutton:hover {
    background-color: @accent-color;
    color: @text-hl-color;
}
/** end ****************************************************************************************/

/*** Buttons ***********************************************************************************/
button {
    min-height: 2.16667em;
    min-width: 2.16667em;
    margin: 0;
    padding: 0; /* x */
    border-radius: 0.2em;
    border: 0.08334em solid @bg-button-border;
    background-color: transparent;
    box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.1);
    background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
}
button.flat {
    padding: 0;/* x */
}
button.text-button label {
    margin: 0 0.5em;/* x */
}

#MainNotebook > header > grid > button,
button.flat {
    border: 0.08334em solid transparent;
    box-shadow: none;
    background-image: none;
    background-color: transparent;
}
/* Resetbutton Queue & Save as*/
dialog scale + button.flat,
scale + button.flat {
    min-height: 1.33334em;
    min-width: 1.25em;
    margin: 0.25em 0 0.16667em 0.16667em;
    padding: 0 0 0 0.08334em;
    -gtk-icon-shadow: none;
}

/* Resetbutton */
#MyExpander button.flat {
    min-height: 1.33334em;
    min-width: 1.25em;
    margin: 0.08334em 0 0.08334em 0.16667em;
    padding: 0 0 0 0.08334em;
    -gtk-icon-shadow: none;
}

#MyExpander scale + button.flat {
    margin: 0 0 0 0.16667em;
}
#MyExpander image + button.flat {
   margin: 0 0 0 0.41667em;
}
#MyExpander spinbutton + button.flat {
    margin: 0 0 0 0.16667em;
    padding-top: 0.08334em;
}
/**/

/* Buttons Curve drawingarea*/
#MyExpander button.flat + button.flat,
#MyExpander button.flat:first-child {
    min-height: 2.16667em;
    min-width: 2.16667em;
    margin: 0.08334em;
    padding: 0;
}
/**/

#ToolBarPanelFileBrowser entry + button:hover,
#FileBrowser entry + button:hover,
button.flat:hover,
button:hover  {
    border-color: @bg-button-border;
    box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.1);
    background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
    background-color: @bg-button-hover;
}

#ToolBarPanelFileBrowser entry + button:active,
#FileBrowser entry + button:active,
button.flat:active,
button.flat:checked,
button:active,
button:checked {
    border-color: @bg-button-border;
    box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.08);
    background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
    background-color: @bg-button-active;
}

/* Add space between connected buttons */
button.Right,
button.MiddleH {
    margin-left: 0.16667em;
    border: 0.08334em solid @bg-button-border;
}
/**/

/* Applies special styles in main notebook */
#ProfilePanel {
    margin-bottom: -2px;
    padding-bottom: 0.41667em;
}
#ProfilePanel combobox {
    margin-left: 0.16667em;
}
#PlacesPaned button.Left,
#PlacesPaned button.Right {
    margin-top: 3px;
}
#PlacesPaned combobox {
    margin-bottom: -3px;
}
/**/

/* Button base format for Toolbox and dialogs */
dialog button,
#MyExpander button,
#BatchQueueButtonsMainContainer button {
    min-height: 1.66667em;
    min-width: 0;
    padding: 0 0.375em;
    margin: 0.08334em 0;
}
combobox .combo,
dialog combobox .combo,
#ToolPanelNotebook combobox .combo,
#BatchQueueButtonsMainContainer combobox .combo {
    padding: 0 0.208334em;
}
/**/

/* Add/remove space between buttons and labels in toolbox*/
#MyExpander combobox:not(:first-child):not(:only-child),
#MyExpander button:not(.flat).Left,
#MyExpander button:not(.flat) + combobox,
#MyExpander combobox + button:not(.flat),
#MyExpander combobox + combobox
/* Crash
#MyExpander button + label,
#MyExpander combobox + label */ {
    margin-left: 0.16667em;
}
#MyExpander label + filechooserbutton,
#MyExpander label + * > button:not(.flat).Left,
#MyExpander label + combobox:not(:first-child):not(:only-child),
#MyExpander label + button:not(.flat):not(spinbutton) {
    margin-left: 0.33334em;
}

buttonbox:not(.dialog-action-area) button{
    margin: 0.08334em 0 0.33334em 0.16667em;
}
#PrefNotebook buttonbox:not(.dialog-action-area) {
    margin-right: -5px;
}

/* Arrow toggle combo button */
#IopsPanel button:not(.flat).Left + button:not(.flat).Right,
#MyExpander button:not(.flat).Left + button:not(.flat).Right {
    border-left: none;
    margin-left: 0;
    padding-left: 0.33334em;
    padding-right: 0.33334em;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
#IopsPanel button:not(.flat).Left,
#MyExpander button:not(.flat).Left {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    min-width: 2.16667em;
}
/**/

/**/
#MyExpander button.text-button label {
    margin: 0;/* x */
}
/* Graduated filter big button */
#ExpanderBox > box > box:first-child > button:not(.flat):not(.text-button):first-child {
    min-height: 2.16667em;
    min-width: 2.16667em;
    padding: 0;
    margin: 0 0 0.5em;
}

.popupbutton-arrow {
    min-width: 0;
}

button.color {
    min-height: 1.16667em;
    padding: 0.25em;
}

/* Save, Cancel, OK ... buttons */
.dialog-action-area button {
    min-height: 2.16667em;
    margin-top: 0.33334em;
}
messagedialog .dialog-action-area button {
    margin: 0 0.66667em 0.66667em 0.66667em;
    min-height: 1.83334em;
}
messagedialog .dialog-action-area button:not(:only-child):nth-child(1) {
    margin-right: 0.25em;
}
messagedialog .dialog-action-area button:not(:only-child):nth-child(2) {
    margin-left: 0.25em;
}
/**/

/* Queue */
#BatchQueueButtons button {
    min-height: 2.16667em;
    min-width: 10em;
}
/**/

/* View & Filechooser Buttons */
dialog .view button,
window .view button {
    background-color: @bg-dark-grey;
    background-image: none;
    box-shadow: none;
    min-height: 2em;
    min-width: 1.33334em;
    padding: 0 0.33334em;
    margin: 0;
}
dialog .view button.text-button label,
window .view button.text-button label {
    margin: 0;
}
window .view button {
    border: none;
    border-bottom: 0.08334em solid @border-color;
}
dialog .view button {
    border: 0.08334em solid @border-color;
}

.view button:checked,
.view button:hover:not(:active) {
    background-image: none;
    background-color: @bg-list-hover;
}
.view button:checked label,
.view button:hover:not(:active) label {
    color: @headline-hl;
}

dialog .view header button:not(:first-child):not(:only-child),
window .view header button:not(:first-child):not(:only-child),
.path-bar button:not(:first-child):not(:only-child) {
    border-left: none;
}
dialog .view header button,
window .view header button,
.path-bar button {
    border-radius: 0;
}

#pathbarbox button:last-child {
    min-height: 2em;
    min-width: 2em;
    margin: 0;
    padding: 0;
 }
.path-bar button:first-child {
    border-top-left-radius: 0.2em;
    border-bottom-left-radius: 0.2em;
    min-width: 2em;
    margin: 0;
    padding: 0;
}
.path-bar button:last-child {
    border-top-right-radius: 0.2em;
    border-bottom-right-radius: 0.2em;
    min-width: 2em;
    margin: 0;
    padding: 0;
}
.path-bar button label {
    margin: 0;
    padding: 0 0.33334em;
}
/**/

/* Popover Filechooser (Create folder) */
popover button.text-button {
    background-color: @bg-dark-grey;
    background-image: none;
    border: 0.08334em solid @border-color;
    box-shadow: none;
    background-image: none;
    margin: 0.083334em 0;
    min-height: 1.66667em;
    padding: 0 0.66667em;
}
popover button.text-button label {
    padding: 0;
    margin: 0;
}

popover button.text-button:hover label {
    color: @headline-hl;
}
popover button.text-button:hover {
    background-color: @bg-list-hover;

}
popover button.text-button:active label {
    color: @text-color;
}
popover button.text-button:active {
    background-color: @bg-dark-grey;
}
/**/

/* Titlebar & Notebook buttons */
#MainNotebook > header.top > grid > button {
    margin: 0 0 0 0.41667em;
}
#MainNotebook > header.left > grid > button {
    margin: 0.41667em 0 0;
}

headerbar button.titlebutton image {
    padding: 0;
    margin: 0;
}
headerbar button.titlebutton {
    margin: 0 0 0 0.33334em;
    background-image: none;
    border: 0.08334em solid transparent;
    background-color: transparent;
    box-shadow: none;
    min-width: 1.55em;
    min-height: 1.55em;
    padding: 0;
}
messagedialog headerbar button.titlebutton {
    min-width: 1.25em;
    min-height: 1.25em;
    margin: 0;
}

#MainNotebook tab #CloseButton {
    padding: 0;
    margin: 0.33334em -3px 0.33334em 0.08334em;
    min-width: 1.5em;
    min-height: 1.5em;
}
#MainNotebook > header > grid > button:hover,
#MainNotebook tab #CloseButton:hover,
headerbar button.titlebutton:hover{
    border-color: rgba(0,0,0,.8);
    box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.11);
    background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
    background-color: rgba(128, 128, 128,.20);
}
#MainNotebook > header > grid > button:active,
headerbar button.titlebutton:active{
    border-color: rgba(0,0,0,.8);
    box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.15);
    background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
    background-color: rgba(128, 128, 128,.40);
}
#MainNotebook tab #CloseButton:hover,
headerbar button.titlebutton.close:hover{
    border-color: rgba(0,0,0,.8);
    background-image: linear-gradient(to bottom, rgb(180,0,0), rgb(160,0,0) 40%, rgb(130,0,0));
    box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.32);
}
#MainNotebook tab #CloseButton:active,
headerbar button.titlebutton.close:active{
    border-color: rgba(0,0,0,.8);
    background-image: linear-gradient(to bottom, rgb(215,0,0), rgb(185,0,0) 40%, rgb(150,0,0));
    box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.4);
}
/**/

/*** end ***************************************************************************************/

/*** Ckeckbox & Radio **************************************************************************/
checkbox,
checkbutton,
radiobutton {
    padding: 0;
    margin: 0;
    min-height: 2em;
}
#PrefNotebook checkbox,
#PrefNotebook checkbutton {
    min-height: 1.6667em;
}

check,
radio {
    border: calc(0.083334em + 0.18px) solid @text-color;
    background-image: none;
    background-color: transparent;
    margin: 0;
    padding: 0;
    min-height: 1.16667em;
    min-width: 1.16667em;
    box-shadow: none;
    background-repeat: no-repeat;
    -gtk-icon-shadow: none;
	color: @text-color;
}
radiobutton label,
checkbutton label {
    margin: 0 0.5em;
    padding: 0;
}
check {
    border-radius: 0.16667em;
}

radio{
    border-radius: 1.16667em;
}
check:disabled,
radio:disabled {
    border-color: @fg-disabled;
}

frame > checkbutton check{
    margin-left: 0.5em;
}

#PartialPaste checkbutton:not(#PartialPasteHeader) {
    min-height: 1.4em;
    margin-left: 1.16667em;
}
#PartialPasteHeader {
    min-height: 1.4em;
    margin-left: 0.5em;
}

#MyExpander button + checkbutton:last-child {
    margin-left: 0.33334em;
}

/*** end ***************************************************************************************/

/*** Entry & Spinbutton ************************************************************************/
#MyExpander entry,
entry {
    margin: 0.08334em 0;
    padding: 0 0.33334em;
    min-height: 1.66667em;
    min-width: 0;
    border-radius: 0.2em;
    box-shadow: inset 0.08334em 0.08334em rgba(0, 0, 0, 0.08), 0 0.08334em rgba(242, 242, 242, 0.1);
    border: 0.08334em solid @bg-entry-border;
    background-color: @bg-scale-entry;
}

spinbutton {
    margin: 0.08334em 0;
    padding: 0;
    min-height: 1.66667em;
    min-width: 0;
    border-radius: 0.2em;
    background-color: @bg-scale-entry;
    border: 0.08334em solid @bg-entry-border;
    box-shadow: inset 0.08334em 0.08334em rgba(0, 0, 0, 0.08), 0 0.08334em rgba(242, 242, 242, 0.1);
}

#MyExpander spinbutton {
    margin: 0.16667em 0;
    padding: 0;
    min-height: 1.33334em;
    min-width: 0;
    border-top-left-radius: 1.83334em;
    border-bottom-left-radius: 1.83334em;
    background-color: @bg-tb-spinbutton;
    border: 0.08334em solid @bg-button-border;
    color: @text-tbEntry;
    box-shadow: inset 0.08334em  0.08334em rgba(0, 0, 0, .12), 0 0.08334em rgba(255, 255, 255, 0.12);
}
#MyExpander button + label + spinbutton {
    margin: 0.25em 0; /* Needed for Reset & and Auto button height*/
}
#MyExpander checkbutton + label + spinbutton {
    margin: 0.33334em 0; /* Needed for Reset & and Auto checkbox button height*/
}

#MyExpander image + spinbutton {
    margin-left: 0.25em;
}

#BatchQueueButtonsMainContainer spinbutton button,
#MyExpander spinbutton button,
spinbutton button {
    padding: 0;
    margin: 0;
    min-height: 0;
    min-width: 1.33334em;
    background-image: none;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    -gtk-icon-shadow: none;
}
#MyExpander spinbutton entry,
spinbutton entry {
    padding: 0 0.33334em;
    margin: 0;
    min-height: 0;
    min-width: 0;
    box-shadow: none;
    border: none;
    background-color: transparent;
}
#MyExpander spinbutton entry {
    padding: 0 0.33334em 0 0.83334em;
}

#BatchQueueButtonsMainContainer spinbutton button:hover,
#MyExpander spinbutton button:hover,
spinbutton button:hover {
    background-color: rgba(0,0,0,0.3);
    background-image: none;
    border: none;
    box-shadow: none;
}
#BatchQueueButtonsMainContainer spinbutton button:active,
#MyExpander spinbutton button:active,
spinbutton button:active {
    background-color: rgba(0,0,0,0.5);
    background-image: none;
    border: none;
    box-shadow: none;
}

#MyExpander entry:disabled,
entry :disabled {
    color: rgb(144,144,144);
}

#MyExpander spinbutton:disabled,
spinbutton:disabled {
    background-color: shade(@bg-grey,.9);
    color: rgb(144,144,144);
    box-shadow: none;
    border-color: shade(@bg-entry-border,1.1);
}

    /* Text selection */
text > selection,
entry > selection  {
    background-color: transparent;
    color: @text-color;
}
text:focus > selection,
entry:focus > selection  {
    background-color: @bg-highlighted-text-color;
    color: @highlighted-text-color;
}

.view entry {
    background-color: @bg-dark-grey;
    margin: 0 -2px;
    border: 0.08334em solid @accent-color;
    box-shadow: none;
}
    /* end*/

/*** end ***************************************************************************************/

/*** Window Layout *****************************************************************************/
:not(.popup):not(tooltip) > decoration {
    background-color: @winHeaderbar;
    background-image: none;
    border-radius: 0.41667em 0.41667em 0 0;
    border: none;
    padding: 0;
    box-shadow: 0 0.25em 0.75em 0.08334em rgba(0, 0, 0, 0.5), 0 0 0 0.08334em @bg-dark-grey;
    margin: 0.83334em;
}
headerbar {
    background-color: shade(@winHeaderbar,1.12);
    box-shadow: inset 0 0.08334em rgba(200,200,200,.13);
    background-image: linear-gradient(shade(@winHeaderbar,1.14), shade(@winHeaderbar,.86));
    border-bottom: 0.08334em solid @bg-dark-grey;
    border-radius: 0.41667em 0.41667em 0 0;
    min-height: 2.16667em;
    padding: 0.08334em 0.41667em 0;
    margin: 0;
}
messagedialog headerbar {
    min-height: 2em;

}
headerbar .title{
    color: @winTitle;
}

/* Window state */
.maximized > headerbar {
    border-radius: 0;
}
/**/

/* Window in background */
:not(.popup):not(tooltip) > decoration:backdrop {
    box-shadow: 0 0.25em 0.75em 0.08334em rgba(0, 0, 0, 0.3), 0 0 0 0.08334em @bg-dark-grey;
}
headerbar:backdrop {
    box-shadow: none;
    background-image: none;
}
headerbar .title:backdrop {
    color: alpha(@winTitle,.60);
}
/*** end ***************************************************************************************/
