/* Inherited from Icefaces modern styling */
html {
    font-size: 11px;
    font-family: var(--font-family);
}


/* Miscellaneous -------------------------------------------------------------------------------- */

.realUserName {
    color: var(--red-500);
    font-weight: bold;
}

.noWrap {
    white-space: nowrap;
}

.transparent {
    background-color: transparent;
}

.topAligned {
    vertical-align: top;
}

.centered {
    text-align: center;
}

.error {
    color: red;
}

/* Goal: table columns with size restricted to content width */
td.minimalWidth {
    width: 1px;
}

.fixedFont {
    font-family: 'Courier new',monospace;
    font-size: 11px;
}

.italicFont {
    font-style: italic;
}

.columnSpacer {
    width: 0;
    margin: 0;
    padding: 0;
    padding-right: 5px;
}

.browserCheckBox {
    margin: 2px 0px 0px 0px;
    padding: 0px;
    height: 14px;
}

.appTitle {
    padding: 0;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    font-style: normal;
}

/* Context title */
.contextPath  {
    font-weight: bold;
    text-decoration: none;
    opacity: 0.5;
    filter: alpha(opacity=50); /* IE */
}

.contextPath:hover {
    text-decoration: none;
    opacity: 1;
    filter: alpha(opacity=100); /* IE */
}

.contextTitle {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 1px 0 1px 0.3em;
    margin-bottom: 0.75rem;
    height: 20px;
    background: transparent;
}

.announcement {
    font-weight: normal;
    padding-bottom: 5px;
}

.announcementIndicator.unread {
    animation: throbber 1s linear infinite;
}

.warning {
    color: var(--red-600);
}

.faded {
    color: var(--text-color-secondary);
}

input.warning, input.ssButton.warning {
    border-color: var(--red-600);
    border-width: 1.5px;
    border-style: solid;
}

/* Attempt to use "disabled" opacity for all readonly fields */
body input.ui-inputfield:read-only:not(.ui-state-disabled),
textarea:read-only:not(.ui-state-disabled) {
    opacity: 0.6;
}

/* Remove "glow" on focused readonly fields */
body .ui-inputfield.ui-state-focus:read-only {
    box-shadow: none;
}

/* Datepicker --------------------------------------------------------------------------------*/

.ui-datepicker-calendar-container > table > tbody > tr > td > span {
    opacity: 0.4;
}

body .ui-datepicker .ui-datepicker-calendar td {
    padding: 0.2rem;
}

body .ui-datepicker .ui-datepicker-buttonbar {
    padding: 0;
}

td .ui-datepicker-today > a:not(.ui-state-active) {
    color: inherit !important;
    background: initial !important; /* lost het niet op */
}

.ui-datepicker a.preferredDate, .ui-datepicker a.highlight {
    background-color: lightgreen;
}

.ui-datepicker a.preferredDate, .ui-datepicker a.highlightUsedDate {
    background-color: lightgrey;
}

.ui-datepicker a.nonPreferredDate {
    background-color: darksalmon;
}

/* Correction on PF theme for disabled dates: */
body .ui-datepicker .ui-datepicker-calendar td span {
    width: 2.5rem;
    height: 2.5rem;
    line-height: 2.5rem;
}

/* fieldset ------------------------------------------------------------------------------------- */

body .ui-fieldset {
    margin-left: 0;
    margin-right: 0;
    padding: 0.5rem;
}

/* Override PF default */
body .ui-fieldset .ui-fieldset-legend {
    border: none;
    padding: 0.5rem;
    margin-bottom: -0.25rem;
    margin-top: 0.25rem;
}

body .ui-fieldset-legend:empty {
    display: none;
}
/* End of fieldset */

/* invisibleHeightFix is used to make sure a table row gets the height of the (hidden) component */
.ui-inputfield.invisibleHeightFix {
    visibility: hidden;
    width: 0 !important;
    min-width: 0 !important;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

input[type="checkbox"] {
    /* Attempt to make checkbox+label left-align with other components above/below */
    margin-left: 0;
}


body .ui-panel {
    margin-bottom: 0.75rem;
}

body .ui-panel .ui-panel-titlebar {
    padding: 0.5rem;
}
body .ui-panel .ui-panel-content {
    padding: 0.75rem;
}


/* START: Attempt to make input fields as wide as their container allows */
.ssFlex .ui-selectmenu.selector:not(.restrictedWidth):not(.imposedWidth),
.ssFlex .ui-autocompleteentry.selector:not(.restrictedWidth) > span:first-child,
.ssFlex .ui-autocompleteentry.selector:not(.restrictedWidth):not(.imposedWidth) .ui-inputfield,
.ssFlex .ui-combobox.selector:not(.restrictedWidth):not(.imposedWidth),
.ssFlex .ui-selectonemenu.selector:not(.restrictedWidth):not(.imposedWidth),
.ssFlex .ui-autocomplete.selector:not(.restrictedWidth):not(.imposedWidth),
.ssFlex .ui-inputtextarea:not(.restrictedWidth):not(.imposedWidth),
.ssFlex .p-datepicker
{
    min-width: 135px;
    width: 100% !important;
}

.ssFlex .ui-autocomplete-input:not(.restrictedWidth):not(.imposedWidth) {
    width: calc(100% - 2.357rem); /* - width of dropdown button */
}

.ssFlex .ui-inputfield.ui-inputtext:not(.restrictedWidth):not(.invisibleHeightFix),
.ssFlex .ui-inputfield.ui-inputmask:not(.restrictedWidth),
.ssFlex input[type="password"].ui-inputfield:not(.restrictedWidth) {
    width: calc(100%) !important;
}

.ssFlex .referenceTable:not(.restrictedWidth) {
    width: 100% !important;
}

.ssFlex .ui-selectmenu:not(.imposedWidth) .ui-selectmenu-value {
    width: 100% !important;
}

.ssFlex .p-datepicker .ui-inputfield.ui-widget {
    min-width: 55px !important;
}

.ssFlex .p-datepicker.ui-trigger-calendar .ui-inputfield {
    width: calc(100% - 2.357rem); /* - width of dropdown button */
}

.ssFlex .p-datepicker:not(.ui-trigger-calendar) .ui-inputfield {
    width: 100%;
}

/* END: Attempt to make input fields as wide as their container allows*/

/* SSButton ------------------------------------------------------------------------------------- */

body .ssButton {
    border: 0px;
    margin: 1px 2px 1px 1px;
}

body .ssButton.labeled {
    min-width: 50px;
    min-height: 22px;
}

body .ui-button-text,
body .ui-button.ui-button-text-only .ui-button-text {
    padding: 0.3rem 0.8rem;
}

.ssButton.image {
    width: 20px;
    padding: 0;
    height: 20px;
    margin-right: 0;
    background-color: transparent;
    background-position: center center !important;
}

.ssButton.image.narrow {
    width: 16px;
}

.ui-button {
    background-repeat: no-repeat !important;
}

.ssButton.combined {
    background-position: 2px center !important;
    padding-left: 10px;
}

.ssButton:focus {
    /* TODO: Primefaces themes: make more obvious which button has focus
    /* outline: 1px dotted var(defaultColor) !important; */
}

body .ui-colorpicker .ui-button {
    background-color: transparent;
}

textArea.singleLine {
    max-height: 3rem;
}

textArea.multiLine {
    max-height: 12rem;
}

/* Footer */
.pageFooter {
    position: fixed;
    bottom: 0;
    left: 0;
    border-top: 1px solid var(--primary-color);
    background-color: var(--surface-200);
    padding: 0 9px 1px 9px;
    font-style: italic;
    z-index: 2;
}

.pageFooter .separator {
    border-right: 1px solid var(--primary-color);
    margin: 0 5px 0 5px;
}

td.componentButton {
    width: 1.5rem;
}

.componentButton input,  .componentButton img {
    margin: 0 0 0 2px;
    vertical-align: middle;
    min-height: 1rem;
}

/* Shapeshifter CellTable --------------------------------------------------- */

.cellTable.ssScrollable {
    border: 1px solid var(--surface-500);
    width: 100%;
}

.cellTable #firstBodyRow {
    height: 0px;
}

div.dataTables_wrapper {
    width: 1000px;
    margin: 0 0;
}

.cellTable.jqScrollable {
    border-collapse: collapse;
}

.cellTable.ssScrollable .headerTable {
    border-collapse: separate;
    width: 100%;
}

.cellTable.ssScrollable .bodyTable {
    border-collapse: separate;
    width: 100%;
}

.cellTable .columnHeader {
    padding: 1px 0px;
}

.cellTable .columnHeader, .cellTable .column {
    border: 1px solid var(--surface-500);
    border-top: none;
    border-left: none;
}

.cellTable .column {
    border-color: transparent;
    padding: 1px 0 1px 2px;
    border-bottom: none;
}

.cellTable .columnHeader .cellText {
    padding: 0px 2px;
}

.cellTable {
    color: var(--text-color)
}

.cellTable a {
    color: var(--primary-color);
}

.cellTable .ui-widget-header {
    background-color: var(--surface-50);
}

.cellTable .bodyTable tr.row {
    vertical-align: top;
    border: none;
}

.cellTable .bodyTable tr.row.row1 {
    background-color: var(--surface-50);
}

.cellTable .bodyTable tr.row.row2 {
    background-color: var(--surface-100);
}

.cellTable .bodyTable tr.row:hover {
    outline: 1px dotted;
}

.cellTable .row1.note > td, .cellTable .row2.note > td {
    /* TODO: Primefaces themes: make notes different from normal text,
     * but not with ---primary-color, since this is not very readable
     */
    background-color: var(--surface-50);
}

/* Slightly opaque text for comments  */
.cellTable .cellText.comment {
    opacity: 0.8;
    filter: alpha(opacity=80); /* IE */
}

.cellTable .expandable {
    cursor: pointer;
    /* Avoid underline: the content may be html */
}

.cellTable .cellText.svgValue svg {
    max-width: 100px;
    height: auto;
}

.blinking {
    animation: blinker 1s linear infinite;
}

.throbbing {
    animation: throbber 1s linear infinite;
}

.textLabel {
    font-weight: bold;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

@keyframes throbber {
    50% {
        transform: scaleX(1.7) scaleY(1.7);
    }
}

/* START Primefaces */

body .ui-selectonemenu-row * {
    vertical-align: middle;
}

body .ui-selectonemenu-panel .ui-selectonemenu-items .ui-selectonemenu-item.ui-selectonemenu-row > td {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    padding-left: 0.3rem;
}

body .ui-selectonemenu-panel .ui-selectonemenu-items .ui-selectonemenu-item.ui-selectonemenu-row > td span {
    padding-left: 0.2rem;
}

body .ui-selectonemenu .ui-selectonemenu-label {
    min-height: 1em;
}

body .ui-selectonemenu-panel .ui-selectonemenu-items {
    padding: 0;
    margin-top: 0.5rem;
}

/*
body .ui-selectonemenu-panel .ui-selectonemenu-items .ui-selectonemenu-item {
    padding-top: 1px;
   padding-bottom: 1px;
   border-bottom: 1px solid lightgrey;
}
*/

body .ui-panel.shrinkToContent .ui-panel-content  {
    padding: 0;
    border: 0;
}
/* PF Datatable */

th.ui-sortable-column:not(.ui-state-active) .ui-sortable-column-icon {
    visibility: hidden;
}

/* Override PF default */

body .ui-datatable .ui-paginator {
    padding: 0.1rem;
    text-align: left;
}
.ui-datatable  table {
    table-layout: auto;
}

.ui-datatable .tableRowSelector {
    width: 1.25rem !important;
}

.ui-datatable th.iconColumn,
.ui-datatable tbody.ui-datatable-data > tr > td.iconColumn,
.ui-datatable tbody.ui-datatable-data-empty > tr > td.iconColumn {
    /* Avoid unneeded extra width for icon columns */
    margin-left: 0;
    padding-left: 1px;
    padding-right: 1px;
    text-align: center;
}

.ui-datatable tbody.ui-datatable-data > tr > td,
.ui-datatable tbody.ui-datatable-data-empty > tr > td {
    padding: 0.4rem 0.3rem;
    height: 16px;
}

body .ui-datatable thead th {
    padding: 0.4rem 0.3rem;
}

/* Avoid applying PF rules for tables inside dataTable cells */
.ui-datatable table table th, .ui-datatable table table td {
    border: none;
    padding: 0;
}

.ui-datatable-data > tr > td {
    vertical-align: top;
}

body .ui-treetable .ui-treetable-data > tr > td .ui-treetable-toggler {
    margin-right: 1rem;
}

.ui-datatable .ui-sortable-column {
    vertical-align: top;
}

.ui-paginator * {
    vertical-align: middle !important;
}

/* Treetable: */

body .ui-treetable.ui-treetable-sm .ui-treetable-data > tr > td {
    padding: 0.25rem 0.25rem;
}
/* Workaround for misalignment of header column widths for scrollable treeTable (from internet) */
body .ui-treetable .ui-treetable-scrollable-header {
    background: transparent;
}
body .ui-treetable-scrollable-header-box {
    margin-right: 15px !important;
}

body .ui-treetable-scrollable-body {
    overflow-x: clip;
}

/* Spreadsheets */
.spreadsheet .ui-datatable.ui-datatable-striped .ui-datatable-data > tr.ui-datatable-even
    > td:not(.pinnedColumn) {
    background: #eecccc;
}

.spreadsheet .ui-datatable.ui-datatable-striped .ui-datatable-data > tr.ui-datatable-odd
    > td:not(.pinnedColumn) {
    background: #ccaaaa;
}

.spreadsheet .singleLine {
    height: unset !important;
}

/* Datatables with pinned (fixed) columns: */
.pinnedColumn  {
    position: sticky;
    position: -webkit-sticky;
    z-index: 1;
}

table > tbody > tr.ui-datatable-even > .pinnedColumn {
    background: #EEE;
    background-clip: padding-box;
}

table > tbody > tr.ui-datatable-odd > .pinnedColumn  {
    background: #CCC;
    background-clip: padding-box;
}

table > tbody > tr.ui-datatable-even:hover > .pinnedColumn,
table > tbody > tr.ui-datatable-odd:hover > .pinnedColumn {
    background: #AAA;
    background-clip: padding-box;
}

/* End PF datatable */

.ui-datalist-data {
    margin: 0;
}

body .ui-tabs .ui-tabs-nav li.ui-tabs-header {
    padding: 0.5rem 1rem;
}

body .ui-tabs .ui-tabs-panels .ui-tabs-panel {
    padding: 5px;
}

body .toolbar {
    display: inline-block;
    margin-top: 5px;
    margin-bottom: 5px;
}

body .toolbar > * {
    vertical-align: middle;
    margin: 1px;
}

body .toolbar > .referenceSelector {
    display: inline-block;
}

body .toolbar .separator {
    background: var(--text-color);
    width: 1px;
    height: 12px;
    display: inline-block;
    margin-left: 4px;
    margin-right: 4px;
    opacity: 0.4;
}

body .toolbar .ui-selectonemenu {
    min-width: 80px !important;
    max-width: 160px;
    min-height: 20px;
    max-height: 20px;
}

.ui-selectonemenu-label {
    text-overflow: ellipsis;
    padding-top: 2px !important;
}

body .iconComboBox {
    background-repeat: no-repeat !important;
    background-position: 1px center;
    padding-left: 16px;
}

.rebusIcon {
    margin-left:2px;
    width:16px;
    height:16px;
    vertical-align:middle;
}

body .toolbar .iconComboBox label {
    /* Improve vertical alignment */
    margin-top: -1px;
}

body .ui-dialog .ui-dialog-titlebar {
    padding: 0.3rem;
    /*border-bottom: 0.5px solid;*/
}

body .ui-dialog .ui-dialog-content {
    padding: 0 1rem 1rem 1rem;
}

body .ui-inputfield, body .ui-autocomplete .ui-autocomplete-input.ui-autocomplete-dd-input,
body .ui-fluid .ui-selectonemenu-label, body .ui-button.ui-button-icon-only .ui-button-text,
body .ui-button-icon-only .ui-button-text,
body .ui-trigger-calendar .ui-datepicker-trigger.ui-button .ui-button-text {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
}

/* Make sure the "empty" option is high enough */
.ui-autocomplete-panel .ui-autocomplete-list-item {
    min-height: 1.5rem;
}

.ui-autocomplete-input.ui-inputfield.ui-state-focus {
    box-shadow: none;
}

/* Make sure drop-down button is not shown on next line: */
span.ui-autocomplete {
    white-space: nowrap;
}

.compactTree .ui-treenode-content {
    height: 18px;
}

.compactTree .ui-tree .ui-tree-container .ui-treenode .ui-treenode-content .ui-treenode-label.ui-state-highlight {
    background: inherit;
    box-shadow: none;
}

.ui-datatable-empty-message {
    display: none;
}

/* Start PF menus */

.ui-menu {
    width: auto;
}

.ui-menu .ui-menu-parent .ui-menu-child {
    width: 25em;
}

.ui-menu * {
    background-repeat: no-repeat;
}

body .ui-menu .ui-menu-list .ui-menuitem .ui-menuitem-link {
    padding: 2px 10px 2px 20px;
}

body .ui-menu.nativeIcons .ui-menu-list .ui-menuitem .ui-menuitem-link {
    padding-left: 12px;
}

body .ui-menuitem-icon {
    min-width: 16px;
    min-height: 16px;
}

body .ui-menu .ui-menu-list .ui-menuitem.ss-icon .ui-submenu-link {
    background-image: inherit;
}

body .ui-menu.ui-menubar {
    padding-top: 0;
    padding-bottom: 0;
}

body .ui-menu .ui-menu-list .ui-menuitem.mainMenuButton > .ui-menuitem-link {
    padding-left: 15px;
    background-color: transparent;
}

.ui-menuitem, .ui-menuitem * {
    background-position: 2px center !important;
    background-repeat: no-repeat !important;
}


/* End PF menus */

/* Grid layout */
div.grid div.label {
    display: table;
    /*text-align: right;*/
}

div.grid div.label label {
    display: table-cell;
    vertical-align: middle;
}

div.grid div[class^="col-"] {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.ui-fieldset-content > .grid {
    margin-top: 0;
}

body .ui-fileupload .ui-fileupload-buttonbar {
    display: none;
}

body .ui-fileupload .ui-fileupload-content {
    padding: 0;
    border: none;
    width: 95%;
}

.ui-fileupload-files {
    margin: 0;
}

.ui-fileupload-row > .ui-fileupload-filename {
    display: none;
}

/* In some themes a selected row in a table will be highlighted with the primary color.
 * The color of a  link is also the primary color. This means that if there is a table containing
 * links the links will not be visible when selecting a row. Set the color of a link in the selected
 * row to the primary text color to avoid this issue (primary text color != primary color).
 */
div.theme-luna .ui-datatable-data > tr.ui-state-highlight .ui-commandlink,
div.theme-nova .ui-datatable-data > tr.ui-state-highlight .ui-commandlink,
div.theme-bootstrap4 .ui-datatable-data > tr.ui-state-highlight .ui-commandlink {
    color: var(--primary-color-text);
    /*font-style: italic;*/
}

.ui-datatable-data .ui-commandlink {
    text-decoration: underline;
}

.ui-datatable-data .ui-commandlink:hover {
    text-decoration-thickness: 2px;
}

/* Text editor */
.ql-editor {
    padding: 0.3rem 0.3rem;
}

.hiddenUntilMouseOverContainer:not(:hover) .hiddenUntilMouseOver {
     visibility: hidden;
 }

#cssLoadingIndicator { display: none !important; }