/*
 * Boomega
 * Copyright (C)  2021  Daniel Gyoerffy
 *
 * This program 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.
 *
 * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 */

@import "fonts.css";

/*******************************************************************************
 *                                                                             *
 * Rounded corners (modifying default JMetro style)                            *
 *                                                                             *
 ******************************************************************************/

.button, .button:focused,
.toggle-button, .toggle-button:focused,
.text-input,
.check-box > .box,
.combo-box, .combo-box:focused,
.menu-button, .menu-button:focused,
.choice-box, .choice-box:focused,
.tooltip,
.date-picker.combo-box-base, .date-picker.combo-box-base:focused, .date-picker.combo-box-base:hover,
.spinner, .spinner .text-field,
.spinner .increment-arrow-button, .spinner .decrement-arrow-button,
.context-menu, .context-menu .menu-item, .combo-box-popup .list-view ,
.color-picker, .color-picker:focused {
    -fx-border-radius: 3;
    -fx-background-radius: 3;
}

.combo-box-popup .list-view {
    -fx-padding: 3 0 3 0;
}

/* The menu-bar's menu buttons shouldn't have rounded corners */
.menu-bar .menu-button {
    -fx-border-radius: 0;
    -fx-background-radius: 0;
}

/*******************************************************************************
 *                                                                             *
 *                                 Context menus                               *
 *                                                                             *
 ******************************************************************************/

.context-menu {
    -fx-padding: 6 5 6 5;
}

/*******************************************************************************
 *                                                                             *
 *                                Read only rating                             *
 *                                                                             *
 ******************************************************************************/

.read-only-rating {
    -fx-font-size: 2.2em;
}

.read-only-rating .unfilled-star {
    -fx-opacity: .4;
}

/*******************************************************************************
 *                                                                             *
 *                                    TabPane                                  *
 *                                                                             *
 ******************************************************************************/

.tab .tab-close-button:hover {
    -fx-background-color: red;
}

.rounded-tab-pane {
    -fx-tab-min-height: 2.4em;
    -fx-tab-max-height: 2.4em;
    -fx-tab-max-width: 17em;
}

.rounded-tab-pane > .tab-header-area  {
    -fx-background-insets: 0, 0 0 1 0;
    -fx-padding: 0.0em 0.166667em 0.0em 0.3em;
}

.rounded-tab-pane > .tab-header-area > .headers-region  {
    -fx-padding: 4 5 5 4;
}

.rounded-tab-pane > .tab-header-area > .headers-region > .tab {
    -fx-padding: 0.083333em 0.8em 0.0769em 0.8em;
    -fx-border-radius: 3;
    -fx-background-radius: 3;
    -fx-background-color: transparent;
}

.rounded-tab-pane > .tab-header-area > .headers-region > .tab > .tab-container > .tab-label {
    -fx-padding: 0 5 0 0;
}

.rounded-tab-pane > .tab-header-area > .headers-region > .tab .tab-close-button {
    -fx-opacity: 0.65;
}

/*******************************************************************************
 *                                                                             *
 *                                  SplitPane                                  *
 *                                                                             *
 ******************************************************************************/

.split-pane > .split-pane-divider {
    -fx-pref-width: 4;
}

.split-pane:horizontal > .split-pane-divider {
    -fx-background-insets: 0, 0 1 0 1;
}

.split-pane:vertical > .split-pane-divider {
    -fx-background-insets: 0, 1 0 1 0;
}

/*******************************************************************************
 *                                                                             *
 *                                  TableView                                  *
 *                                                                             *
 ******************************************************************************/

.table-view .table-row-cell:filled {
    -fx-border-width: 0 0 0.5 0;
}

/*******************************************************************************
 *                                                                             *
 *                                  MenuBar                                    *
 *                                                                             *
 ******************************************************************************/

.menu-bar > .container > .menu-button,
.menu-bar > .container > .menu-button {
    -fx-padding: 5 12 5 8;
    -fx-border-width: 2;
    -fx-border-color: transparent;
}

.menu-bar > .container > .menu-button:showing,
.menu-bar > .container > .menu-button:focused {
    -fx-border-color: rgb(0, 120, 215) transparent transparent transparent;
}

/*******************************************************************************
 *                                                                             *
 *                                MarkdownView                                 *
 *                                                                             *
 ******************************************************************************/

.medium-font {
    -fx-font-size: 16px;
}

.markdown-text {
    -fx-font-family: "Jetbrains Mono";
}

.markdown-italic {
    -fx-font-style: italic;
}

.markdown-bold {
    -fx-font-weight: bold;
}

.markdown-link-hover {
    -fx-underline: true;
}

.markdown-strikethrough {
    -fx-strikethrough: true;
}

/*******************************************************************************
 *                                                                             *
 *                              MarkdownEditorControl                          *
 *                                                                             *
 ******************************************************************************/

.markdown-preview-area .mdfx-node {
    -fx-padding: 5;
}

.markdown-edit-area .code-area {
    -fx-padding: 5;
}

.markdown-edit-area .styled-text-area .text {
    -fx-font-family: "Jetbrains Mono";
    -fx-font-size: 15px;
}

.markdown-editor-toolbar .toggle-button, .markdown-editor-toolbar .button {
    -fx-padding: 1;
}

/*******************************************************************************
 *                                                                             *
 *                                 TextField                                   *
 *                                                                             *
 ******************************************************************************/

.text-field:readonly {
    -right-button-visible: false;
}

.text-field .right-button {
    -fx-background-color: transparent;
    -fx-padding: 5;
}

/*******************************************************************************
 *                                                                             *
 *                                  Base View                                  *
 *                                                                             *
 ******************************************************************************/

.overlay-box {
    -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 20, 0.19, -1, 6);
}

.overlay-box .title-bar {
    -fx-padding: 5;
    -fx-background-radius: 5 5 0 0;
}

.overlay-box .content {
    -fx-background-radius: 0 0 5 5;
}

.alertDialog .button {
    -fx-padding: 5;
}

/*******************************************************************************
 *                                                                             *
 *                           Language selection control                        *
 *                                                                             *
 ******************************************************************************/

.languageSelector .text-field {
    -right-button-visible: false;
}

/*******************************************************************************
 *                                                                             *
 *                                  PropertyTable                              *
 *                                                                             *
 ******************************************************************************/

.property-table .property-mark-label {
    -fx-font-weight: bold;
}

.property-table {
    -fx-background-color: transparent;
}

.property-table .table-column {
    -fx-background-color: transparent;
}

.property-table .table-row-cell {
    -fx-background-color: transparent;
    -fx-border-color: transparent !important;
}

.property-table .column-header-background {
    -fx-background-color: transparent;
}

.property-table .filler {
    -fx-background-color: transparent;
}

.property-table .read-only-rating {
    -fx-font-size: 1.5em;
}

/*******************************************************************************
 *                                                                             *
 *                                 NotificationNode                            *
 *                                                                             *
 ******************************************************************************/

.notification-node {
    -fx-border-width: 0.5;
    -fx-border-radius: 2;
    -fx-background-radius: 2;
    -fx-padding: 10;
    -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, .26), 20, 0.19, -1, 6);
}

.notification-node .content-panel {
    -fx-border-radius: 2;
    -fx-background-radius: 2;
    -fx-padding: 0 25 0 0;
}

.notification-node .glyph-icon {
    -fx-font-size: 20 !important;
}

.notification-node .content-panel .title {
    -fx-font-size: 1.1em;
    -fx-font-weight: bold;
}

.notification-node .content-panel .message {
    -fx-font-size: 1em;
}

/*******************************************************************************
 *                                                                             *
 *                               First time dialog                             *
 *                                                                             *
 ******************************************************************************/

.segmentLabelArea {
    -fx-padding: 5 5 10 5;
}

.segmentDialogBottom {
    -fx-padding: 10;
}

.segmentLabel:focused {
    -fx-font-weight: bold;
    -fx-border-width: 0 0 2.5 0;
}

.segmentTitleLabel {
    -fx-padding: 10;
    -fx-font-weight: bold;
    -fx-font-size: 20;
}

/*******************************************************************************
 *                                                                             *
 *                                 Update dialog                               *
 *                                                                             *
 ******************************************************************************/

.update-view-available-label {
    -fx-font-size: 32px;
}

.no-binary-available-place-holder .label {
    -fx-text-fill: red;
}

.updateDialog {
    -fx-effect: dropshadow(three-pass-box, #000000, 10.0, 0, 0, 0);
    -fx-background-radius: 3;
}

.progress-bar:paused .bar {
    -fx-background-color: #e5c405;
}

/*******************************************************************************
 *                                                                             *
 *                                 Information view                            *
 *                                                                             *
 ******************************************************************************/

.info-logo-view {
    -fx-image: url("/com/dansoftware/boomega/image/logo/boomega_c_32.png");
}

.information-view {
    -fx-padding: 10;
}

/*******************************************************************************
 *                                                                             *
 *                                  Login view                                 *
 *                                                                             *
 ******************************************************************************/

.login-form {
    -fx-background-size: stretch;
}

.login-box {
    -fx-border-radius: 0 0 10 10;
    -fx-background-radius: 0 0 10 10;
}

.login-box .source-adder {
    -fx-border-radius: 0 0 10 10;
    -fx-background-radius: 0 0 10 10;
}

.login-box .header * {
    -fx-font-family: "JetBrains Mono Bold";
    -fx-font-size: 35px;
}

.login-box .header .logo {
    -fx-image: url("/com/dansoftware/boomega/image/logo/boomega_b_32.png");
}

.login-box .header .label {
    -fx-opacity: .8;
}

/*******************************************************************************
 *                                                                             *
 *                                  Database manager                           *
 *                                                                             *
 ******************************************************************************/

.state-indicator-file-not-exists {
    -fx-fill: #B00020 !important;
}

.state-indicator-used {
    -fx-fill: green !important;
}

/*******************************************************************************
 *                                                                             *
 *                                 Preferences view                            *
 *                                                                             *
 ******************************************************************************/

.preferences-view .entry-title {
    -fx-font-weight: bold;
    -fx-font-size: 13px;
}

.preferences-view .entry-description {
    -fx-font-size: 10pt;
    -fx-opacity: 0.75;
}

/*******************************************************************************
 *                                                                             *
 *                                 Plugin manager                              *
 *                                                                             *
 ******************************************************************************/

.pluginAdderPane {
    -fx-min-width: 0;
}

.pluginAdderPane .draggingArea {
    -fx-cursor: hand;
    -fx-stroke-dash-array: 12 12 12 2;
    -fx-stroke-dash-offset: 1;
    -fx-stroke-line-cap: butt;
    -fx-stroke-width: 5px;
    -fx-stroke: gray;
}

.pluginAdderPane .draggingArea:hover {
    -fx-stroke-dash-array: 12 2 4 2;
    -fx-stroke-dash-offset: 10;
}

.pluginAdderPane .draggingLabel {
    -fx-cursor: hand;
    -fx-text-alignment: center;
    -fx-font-size: 17;
    -fx-max-width: 490;
    -fx-max-height: 390;
}

.restartWarningLabel {
    -fx-text-fill: red;
}

/*******************************************************************************
 *                                                                             *
 *                           Google book details pane                          *
 *                                                                             *
 ******************************************************************************/

.google-book-details-pane {
    -fx-padding: 10;
}

.google-book-details-pane .thumbnail-place-holder {
    -fx-font-size: 50 !important;
}

.google-book-details-pane .description-area {
    -fx-padding: 2px;
}

.google-book-details-pane .description-area .markdown-normal-flow {
    -fx-text-alignment: justify;
}

.google-book-details-pane .header-area .label {
    -fx-font-size: 17px;
}

.google-book-details-pane .info-panel .label {
    -fx-font-size: 16px;
}

.google-book-details-pane .header-area .main-header-area {
    -fx-padding: 5;
}

.google-book-details-pane .hyperlink {
    -fx-padding: 0;
}

.google-book-details-pane .web-view {
    -fx-page-fill: transparent;
}

/*******************************************************************************
 *                                                                             *
 *                           Google book import view                           *
 *                                                                             *
 ******************************************************************************/

.google-books-search-form .title-label {
    -fx-font-size: 2em;
    -fx-opacity: .7;
}

.google-books-search-form .formsfx-group {
    -fx-padding: 0;
    -fx-border-color: transparent;
}

.google-books-search-form .details-pane:collapsed .title {
    -fx-border-radius: 3;
    -fx-background-radius: 3;
}

.google-books-search-form .details-pane:expanded .title {
    -fx-border-radius: 3 3 0 0;
    -fx-background-radius: 3 3 0 0;
}

.google-books-pagination {
    -fx-padding: 0 0 5 0;
}

.google-books-search-form .details-pane .content {
    -fx-padding: 0;
    -fx-border-radius: 0 0 3 3;
    -fx-background-radius: 0 0 3 3;
}

.google-books-search-form .text-field {
    -fx-padding: 5 10 5 5;
}

.google-books-table .thumbnail-place-holder {
    -fx-font-size: 80 !important;
}

.google-book-search-toolbar .import-button,
.google-book-search-toolbar .import-button:hover,
.google-book-search-toolbar .import-button:pressed {
    -fx-background-color: rgb(0, 120, 215);
    -fx-text-fill: whitesmoke;
}

.google-book-search-toolbar .import-button .glyph-icon {
    -fx-fill: whitesmoke;
}

/*******************************************************************************
 *                                                                             *
 *                           Google book preview                               *
 *                                                                             *
 ******************************************************************************/

.google-book-preview .place-holder .glyph-icon {
    -fx-font-size: 2em !important;
}

.google-book-preview .place-holder .label {
    -fx-font-size: 1.5em;
}

.google-book-preview-toolbar .label {
    -fx-font-size: 1.05em;
}

.google-book-preview-toolbar .google-icon {
    -fx-font-size: 1.4em !important;
}

/*******************************************************************************
 *                                                                             *
 *                                  Records view                               *
 *                                                                             *
 ******************************************************************************/

.record-base-editor .formsfx-group {
    -fx-padding: 0;
    -fx-border-color: transparent;
}

.records-view .tab-pane > .tab-header-area {
    -fx-padding: 0;
}

.records-view .tab-pane {
    -fx-tab-min-height: 2.2em;
    -fx-tab-max-height: 2.2em;
}

.records-view .books-table .read-only-rating .glyph-icon {
    -fx-font-size: 1.5em !important;
}

.record-find-control .text-field {
    -fx-padding: 5px;
}

.record-find-control .error-label {
    -fx-text-fill: red;
}

.record-table-place-holder .label {
    -fx-font-size: 18;
}

.records-view-toolbar .options-item .arrow-button {
     -fx-padding: 0;
}

.records-view-toolbar .options-item .arrow-button > .arrow {
     -fx-padding: 0;
}

.multiple-selection-place-holder .glyph-icon,
.no-connection-place-holder .link-off-icon,
.error-place-holder .warning-icon {
    -fx-font-size: 2em !important;
}

/*******************************************************************************
 *                                                                             *
 *                         Export configuration views                          *
 *                                                                             *
 ******************************************************************************/

.records-view-config-panel, .export-configuration-view {
    -fx-pref-width: 30em;
    -fx-pref-height: 30em;
}

.export-configuration-view .style-view .category-label {
    -fx-font-weight: bold;
    -fx-font-size: 1.1em;
}

.export-configuration-view .tab-pane > .tab-header-area {
    -fx-padding: 0;
}

/*******************************************************************************
 *                                                                             *
 *                                    Docks                                    *
 *                                                                             *
 ******************************************************************************/

.dock-title-bar {
    -fx-pref-height: 1.7em;
    -fx-border-width: 0 0 1 0;
    -fx-padding: 3 3 3 5;
}

.dock-title-bar .h-box {
    -fx-spacing: 5px;
}

.dock-title-bar .label {
    -fx-text-alignment: center;
    -fx-alignment: center-left;
}

/*******************************************************************************
 *                                                                             *
 *                                 Database View                               *
 *                                                                             *
 ******************************************************************************/

.database-view {
    -fx-font-size: 14px;
}

.database-view-toolbar {
    -fx-border-width: 1 0 1 0;
    -fx-pref-height: 25;
    -fx-font-size: 12px;
}

.database-view .tab-view .module-view .label-area .image-view {
    -fx-image: url("/com/dansoftware/boomega/image/logo/boomega_b_32.png");
}

.database-view .tab-view .module-view .label-area * {
    -fx-font-family: "Jetbrains Mono";
    -fx-font-size: 40;
}

.database-view .tab-view .module-view .label-area .label {
    -fx-opacity: .8;
}

.database-view .tab-view .module-view .label-area .glyph-icon {
    -fx-font-size: 80 !important;
}

.database-view .tab-view .module-view .tile-pagination {
    -fx-padding: 0 0 4em 0;
    -fx-arrows-visible: false;
    -fx-page-information-visible: false;
    -fx-tooltip-visible: false;
}

.database-view .tab-view .module-view .tile-pagination:one-page {
    -fx-padding: 0;
}

.database-view .tab-view .module-view .tile-pagination:one-page > .pagination-control {
    -fx-opacity: 0;
}

.database-view .tab-view .module-view .tile-pagination > .pagination-control > .control-box {
    -fx-spacing: .25em;
}

.database-view .tab-view .module-view .tile-grid {
    -fx-background-color: transparent;
    -fx-hgap: 10;
    -fx-vgap: 20;
}

.database-view .tab-view .module-view .tile {
    -fx-border-radius: 7;
    -fx-background-radius: 7;
    -fx-padding: 15 10 0 10;
    -fx-pref-width: 9em;
    -fx-pref-height: 9.3434588481230382312016806204436em;
    -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.07), 10, 0.12, -1, 2);
}

.database-view .tab-view .module-view .tile .button {
    -fx-pref-width: 6.3em;
    -fx-cursor: HAND;
    -fx-border-radius: 7;
    -fx-background-radius: 7;
    -fx-padding: 20;
    -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.07), 10, 0.12, -1, 2);
}

.database-view .tab-view .module-view .tile .button .glyph-icon {
    -fx-font-size: 25 !important;
}

.database-view .tab-view .module-view .tile .label {
    -fx-padding: inherit 5 inherit 5;
    -fx-font-size: 0.8em;
}

.database-view .tab-view .module-view .database-view .context-menu {
    -fx-font-size: 0.998em;
}

/*******************************************************************************
 *                                                                             *
 *                                                                             *
 *                                                                             *
 ******************************************************************************/

.header-toolbar {
    -fx-padding: 12 10 12 10;
    -fx-border-width: 0;
}