/*
 * samplesviewer.css Copyright (C) 2020. Daniel H. Huson
 *
 *  (Some files contain contributions from other authors, who are then mentioned separately.)
 *
 *  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/>.
 *
 */

.cell-spreadsheet .table-row-cell {
    -fx-background-color: transparent;
}

/* FIRST CELL */
.spreadsheet-cell.first-cell:filled:selected,
.spreadsheet-cell.first-cell:filled:focused:selected,
.spreadsheet-cell.first-cell:filled:focused:selected:hover {
    -fx-background-color: #FFDA8C;
}

.spreadsheet-cell.first-cell:hover {
    -fx-background-color: #988490;
    -fx-background-insets: 0, 0 0 1 0;
}

.spreadsheet-cell.first-cell {
    -fx-background-color: -fx-table-cell-border-color, #77ABD6;
    -fx-background-insets: 0, 0 1 1 0;
    -fx-alignment: CENTER_LEFT;
}

/* NORMAL CELL */
.spreadsheet-cell:filled:selected,
.spreadsheet-cell:filled:focused:selected,
.spreadsheet-cell:filled:focused:selected:hover {
    -fx-background-color: #FFDA8C;
    -fx-border-color: #a9a9a9;
    -fx-border-width: 0.5px;
    -fx-text-fill: -fx-selection-bar-text;

}

.spreadsheet-cell:hover,
.spreadsheet-cell:filled:focused {
    -fx-background-color: #988490;
    -fx-text-fill: -fx-text-inner-color;
    -fx-background-insets: 0, 0 0 1 0;
}

.spreadsheet-cell {
    -fx-padding: 0 0 0 0.2em;
    -fx-border-color: black;
    -fx-border-width: 0.3px;
    -fx-background-color: -fx-table-cell-border-color, white;
}

.tooltip {
    -fx-background-radius: 0px;
    -fx-background-color: linear-gradient(#cec340, #a59c31),
    linear-gradient(#fefefc, #e6dd71),
    linear-gradient(#fef592, #e5d848);
    -fx-background-insets: 0, 1, 2;
    -fx-padding: 0.333333em 0.666667em 0.333333em 0.666667em; /* 4 8 4 8 */
    -fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.6), 8, 0.0, 0, 0);
    -fx-text-fill: black;
}

/* FIXED HEADERS  */
VerticalHeader > Label.fixed {
    -fx-background-color: -fx-box-border, -fx-inner-border, linear-gradient(to left, derive(-fx-color, -20%), derive(-fx-color, -10%));
    -fx-font-style: italic;
}

HorizontalHeaderColumn > TableColumnHeader.column-header.table-column.fixed {
    -fx-background-color: -fx-box-border, -fx-inner-border, linear-gradient(to top, derive(-fx-color, -20%), derive(-fx-color, -10%));
    -fx-font-style: italic;
}

/* HORIZONTAL AND VERTICAL HEADER SELECTION */
VerticalHeader > Label {
    -fx-background-color: -fx-box-border, -fx-inner-border, linear-gradient(to left, derive(-fx-color, -5%), derive(-fx-color, 5%));
    -fx-background-insets: 0, 0 1 1 0, 1 2 2 1;
    -fx-font-weight: bold;
    -fx-size: 2em;
    -fx-text-fill: -fx-selection-bar-text;
    /*-fx-padding: 0.166667em;*/
    /*-fx-label-padding:0 0 0 20;*/
    -fx-alignment: center;
    -fx-font-style: normal;
}

VerticalHeader > Label.selected {
    -fx-background-color: -fx-box-border, -fx-inner-border, linear-gradient(to right, derive(#FFDB6D, -10%), derive(#FFDB6D, 10%));
    -fx-background-insets: 0, 0 1 1 0, 1 2 2 1;
    -fx-font-weight: bold;
    -fx-size: 2em;
    -fx-text-fill: -fx-selection-bar-text;
    -fx-alignment: center;
    -fx-border-color: #FFDB6D;
}

HorizontalHeaderColumn > TableColumnHeader.column-header.table-column.selected {
    -fx-background-color: -fx-box-border, -fx-inner-border, linear-gradient(to bottom, derive(#FFDB6D, -10%), derive(#FFDB6D, 10%));
    -fx-background-insets: 0, 0 1 1 0, 1 2 2 1;
    -fx-font-weight: bold;
    -fx-size: 2em;
    -fx-text-fill: -fx-selection-bar-text;
    -fx-alignment: center;
    -fx-border-color: #FFDB6D;
}

/* HORIZONTAL HEADER VISIBILITY */
.column-header-background.invisible {
    visibility: hidden;
    -fx-padding: -1em;
}

.cell-corner {
    -fx-background-color: red;
}

.cell-corner.top-left {
    -fx-shape: "M 0 0 L 1 0 L 0 1 z";
}

.cell-corner.top-right {
    -fx-shape: "M 0 0 L -1 0 L 0 1 z";
}

.cell-corner.bottom-right {
    -fx-shape: "M 0 0 L -1 0 L 0 -1 z";
}

.cell-corner.bottom-left {
    -fx-shape: "M 0 0 L 1 0 L 0 -1 z";
}

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

/* PICKERS */
.picker-label {
    -fx-graphic: url("../icons/Circle16.gif");
    -fx-background-color: #DBDBDB;
    -fx-padding: 0 0 0 0;
    -fx-alignment: center;
}

.picker-label:hover {
    /*-fx-effect:dropshadow(gaussian, black, 10, 0.1, 0, 0);*/
    -fx-cursor: hand;
}

/* We do not want to show the textfield, we want an Excel visual */
CellView > .text-input.text-field,
CellView > .text-input.text-area {
    -fx-padding: 0.5em 0 0 -0.2em;
    -fx-background-color: transparent;
}

/* We want to show a red background when the value entered is incorrect */
CellView > .text-input.text-field.error {
    -fx-background-insets: 0 0 0 -0.5em;
    -fx-background-color: red;
}

.selection-rectangle {
    -fx-fill: transparent;
    -fx-stroke: black;
    -fx-stroke-width: 2;
}
