/* Border for RichTextFX, similar to normal JavaFX text area: focused color, etc.
Based on https://stackoverflow.com/questions/37808715/how-to-make-look-and-feel-of-richtextfx-similar-to-textarea
*/

.virtualized-scroll-pane {
    -fx-background-color: linear-gradient(to bottom, derive(-fx-text-box-border, -10%), -fx-text-box-border),
    linear-gradient(from 0px 0px to 0px 5px, derive(-fx-control-inner-background, -9%), -fx-control-inner-background);
    -fx-background-insets: 0, 1;
    -fx-background-radius: 3, 2;
}

.virtualized-scroll-pane:focused {
    -fx-background-color:
            -fx-focus-color,
            -fx-control-inner-background,
            -fx-faint-focus-color,
            linear-gradient(from 0px 0px to 0px 5px, derive(-fx-control-inner-background, -9%), -fx-control-inner-background);
    -fx-background-insets: -0.2, 1, -1.4, 3;
    -fx-background-radius: 3, 2, 4, 0;
}

.virtualized-scroll-pane .styled-text-area {
    -fx-background-insets: 0px;
}

.virtualized-scroll-pane .styled-text-area .paragraph-box:first-paragraph .paragraph-text {
    -fx-padding: 5px 2px 0 2px;
}

.virtualized-scroll-pane .styled-text-area .paragraph-box:first-paragraph .lineno {
    -fx-padding: 5px 5px 0 5px;
}

.virtualized-scroll-pane .scroll-bar:horizontal {
    -fx-background-radius: 0 0 2 2;

    -fx-padding: 0 0.08333325em 0.08333325em 0.08333325em;
    -fx-border-insets: 0 0.08333325em 0.08333325em 0.08333325em;
    -fx-background-insets: 0 0.08333325em 0.08333325em 0.08333325em;
}

.virtualized-scroll-pane .scroll-bar:vertical {
    -fx-background-radius: 0 2 2 0;

    -fx-padding: 0.08333325em 0.08333325em 0.08333325em 0;
    -fx-border-insets: 0.08333325em 0.08333325em 0.08333325em 0;
    -fx-background-insets: 0.08333325em 0.08333325em 0.08333325em 0;
}

.virtualized-scroll-pane {
    -fx-padding: 0.08333325em;
}
