/**
	Override the styles from primefaces
*/

/* don't display labels bold */
form label {
    font-weight: normal;
}

/* requirement: make the inline edit dataTable's "editRow"'s header disappear */
.ui-datatable thead th.editRow {
	background-color: inherit;
	background-image: none;
	border-top: 1px solid #fff;
	border-right: 1px solid #fff;
}

/* format dataTable inline edit select menus nicely */
.ui-cell-editor-input > div {
	width: 100%;
}

/* format dataTable inline edit inputs nicely */
.ui-cell-editor-input > input {
	width: 80%;
	display: block;
	margin : 0 auto;
}

/* limit the width of tooltips */
.ui-tooltip {
	max-width: 400px;
}

/* Remove IE clear button */
th>input.ui-column-filter::-ms-clear {
	display: none;
}

.ui-accordion .ui-accordion-header .ui-icon {
    display: block;
}

/* primefaces file upload generates a huge area for the button itself, we limit it's size a bit */
input[type='file'] {
	max-height: 25px;
}

.ui-state-disabled.fontAwesome {
	background-color: transparent;
}

.ui-icon-fixed .ui-icon {
	background-image: url(/ibs/jakarta.faces.resource/images/primefaces/ui-icons_333333_256x240.png.xhtml);
}

.ui-treetable table {
	border-collapse: collapse;
	table-layout: auto;
	width: 100%;
}

.ui-treetable thead th, .ui-treetable tbody td, .ui-treetable tfoot td {
    white-space: normal !important;
}

div.blockUI {
	position: fixed !important;
}

/* Reduce the margin padding in datatables to be able to display more content */
.ui-datatable thead th, .ui-datatable tbody td, .ui-datatable tfoot td, .ui-datatable tfoot th {
	padding: 3px 8px;
}

/* Forget the 100px for every filter field, it mostly depends on content rather than 100px */
.ui-datatable .ui-column-filter {
	width: 80%;
}

/* make the columns auto size them self to the content */
.ui-datatable table {
	table-layout: auto;
}

/* p:datePicker (PF15) — keep trigger button right of the input, not below it.
   The PF15 theme's absolute-position + calc(100%) width scheme pushes the button
   below the input here. Drive the layout with flexbox instead — needs all THREE
   changes together (each alone is a no-op):
     1. container -> inline-flex          (children lay out in a row)
     2. button    -> position:relative    (keeps it the containing block for its
                                           absolutely-positioned .ui-icon glyph)
     3. input     -> width:auto + flex:1  (drop calc(100%) that fights the row) */
.p-datepicker {
    display: inline-flex !important;
    align-items: stretch !important;
    width: auto !important;
}
.p-datepicker > input.hasDatepicker,
.p-datepicker > input.p-inputtext {
    position: static !important;
    width: auto !important;
    flex: 1 1 auto !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.p-datepicker .ui-datepicker-trigger.ui-button {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    flex: 0 0 auto !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    /* dark icon on the theme's native light-grey button (bootstrap .ui-state-default:
       bg #f5f5f5, color #333). PF15's cascade left the glyph white -> invisible. */
    color: #333 !important;
}
/* Inside an edited dataTable row (.ui-state-highlight), bootstrap swaps .ui-icon to a
   WHITE sprite -> the calendar icon vanishes (e.g. Kommunikationslog datumZeit cell editor).
   Pin the trigger icon to the same dark sprite the app already uses via .ui-icon-fixed. */
.p-datepicker .ui-datepicker-trigger.ui-button .ui-icon {
    background-image: url(/ibs/jakarta.faces.resource/images/primefaces/ui-icons_333333_256x240.png.xhtml) !important;
}

/* exceptions for auto sizing of the columns should use this */
.ui-datatable.fixed-layout table {
	table-layout: fixed;
}