/*
* This is a more lightweight version of the default JabRef theme.
* It will automatically use the OS color scheme, of not overridden inside JavaFX.
*/

@media (prefers-color-scheme: light) {
    * {
        -base-color: #A3B7E6;
        -base-hover-color: derive(#A3B7E6, 10%);
        -base-armed-color: derive(#A3B7E6, -10%);
        -background: #F3F3F3;
    }
}

@media (prefers-color-scheme: dark) {
    * {
        -base-color: #255652;
        -base-hover-color: derive(#255652, 10%);
        -base-armed-color: derive(#255652, -10%);
        -background: #151924;
    }
}

.root {
    -fx-base: -background;
    -fx-control-inner-background: -fx-base;
    -fx-background: -background;
    -fx-selection-bar: -base-color;
    -fx-selection-bar-non-focused: -base-hover-color;
    -fx-focus-color: -base-color;
    -fx-faint-focus-color: transparent;

    -fx-text-inner-color: ladder(
            -fx-color,
            -fx-light-text-color 45%,
            -fx-dark-text-color  46%,
            -fx-dark-text-color  59%,
            -fx-mid-text-color   60%
    );
}

.popup {
    -fx-background: derive(-background, 10%);
    -fx-background-color: -fx-background;
    -fx-border-color: derive(-background, 20%);
}

.button,
.toggle-button {
    -fx-color: -base-color;
    -fx-background: -fx-color;
    -fx-background-color: -fx-color;
    -fx-border-color: -fx-color;
    -fx-background-insets: 0;
}

.button:hover,
.toggle-button:hover {
    -fx-color: -base-hover-color;
}

.button:armed,
.toggle-button:selected {
    -fx-color: -base-armed-color;
}

.scroll-pane {
    -fx-background-color: transparent;
}

.combo-box-popup > .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:hover {
    -fx-background: -fx-selection-bar;
}

.combo-box-popup > .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected,
.combo-box-popup > .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected:hover {
    -fx-background: -fx-selection-bar;
}

.search-result-label {
    -fx-font-weight: bold;
    -fx-font-size: 14px;
    -fx-fill: -fx-text-background-color;
}

.search-result-description {
    -fx-font-size: 12px;
    -fx-fill: -fx-text-background-color;
}

.chip-remove-button {
    -fx-color: transparent;
    -fx-font-size: 16px;
    -fx-font-weight: bold;
    -fx-padding: 0 0 0 0;
    -fx-cursor: hand;
}

.chip-remove-button:hover {
    -fx-color: transparent;
    -fx-text-fill: #d32f2f;
}

.chip-style {
    -fx-background-radius: 15;
    -fx-border-radius: 15;
    -fx-border-width: 1;
    -fx-cursor: hand;
    -fx-background-color: -base-color;
    -fx-border-color: derive(-base-color, 10%);
}

.chip-style:hover {
    -fx-background-color: derive(-base-color, -10%);
}
