/*
 * Initially sourced from: https://github.com/joffrey-bion/javafx-themes/blob/master/css/modena_dark.css
 * (heavily modified)
 */


/* Redefine base colors */
.root {
    -fx-base: rgb(51, 50, 49);
    -fx-background: rgb(50, 50, 50);

    /* make controls (buttons, thumb, etc.) slightly lighter */
    -fx-color: derive(-fx-base, 25%);

    /* text fields and table rows background */
    /*-fx-control-inner-background: rgb(20, 20, 20);*/
    -fx-control-inner-background: rgb(70, 70, 70);
    /* version of -fx-control-inner-background for alternative rows */
    -fx-control-inner-background-alt: derive(-fx-control-inner-background, 2%);

    /* text colors depending on background's brightness */
    -fx-light-text-color: rgb(220, 220, 220);
    -fx-mid-text-color: rgb(100, 100, 100);
    -fx-dark-text-color: rgb(20, 20, 20);

    /* A bright blue for highlighting/accenting objects.  For example: selected
     * text; selected items in menus, lists, trees, and tables; progress bars */
    -fx-accent: rgb(0, 140, 173);

    /*-fx-default-button: #64d8ed;*/

    /* color of non-focused yet selected elements */
    -fx-selection-bar-non-focused: rgb(50, 50, 50);
}

.button:default {
    -fx-mid-text-color: -fx-dark-text-color;
    -fx-color: -fx-base;
}

/*noinspection CssInvalidPseudoSelector,CssInvalidFunction*/
.dialog-pane:header .header-panel {
    -fx-background-color: -fx-box-border, linear-gradient(-fx-background, derive(-fx-background, -30%));
}

.menu-bar {
    -fx-background-color: derive(-fx-color, -30%);
}

/* Fix derived prompt color for text fields */
.text-input {
    -fx-prompt-text-fill: derive(-fx-control-inner-background, +50%);
}

/* Keep prompt invisible when focused (above color fix overrides it) */
.text-input:focused {
    -fx-prompt-text-fill: transparent;
}

/* Fix scroll bar buttons arrows colors */
.scroll-bar > .increment-button > .increment-arrow,
.scroll-bar > .decrement-button > .decrement-arrow {
    -fx-background-color: -fx-mark-highlight-color, rgb(220, 220, 220);
}

.scroll-bar > .increment-button:hover > .increment-arrow,
.scroll-bar > .decrement-button:hover > .decrement-arrow {
    -fx-background-color: -fx-mark-highlight-color, rgb(240, 240, 240);
}

.scroll-bar > .increment-button:pressed > .increment-arrow,
.scroll-bar > .decrement-button:pressed > .decrement-arrow {
    -fx-background-color: -fx-mark-highlight-color, rgb(255, 255, 255);
}

.choice-box > .open-button > .arrow {
    -fx-background-color: -fx-mark-highlight-color, rgb(220, 220, 220);
}
