/*region Bootstrap override*/

/* blue title */
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    color: #008ccc;
}

/* white title in header */
.u-header .h1 {
    color: white;
}

.mobile .u-header .h1 {
    font-size: 1.8em;
}

/* by default Bootstrap set table borders to collapse, change this so border appears again in list and grid views */
.z-grid-body table, .z-listbox-body table {
    border-collapse: separate;
}

/*endregion*/

/*region ZK override*/

/* ZK applies 5px of padding by default, reset it */
body {
    padding: 0;
}

/* page content */
.z-page {
    background: white;
    height: auto !important;
    margin: auto;
    padding: 0 15px 15px;
}

/* more padding for multiline text boxes */
textarea.z-textbox {
    padding: 10px;
}

/* blue group box caption titles */
.z-caption-content, .z-caption .z-label {
    font-size: 1.15em;
    color: #018ccd;
}

/* break words in message boxes */
.z-messagebox {
    word-break: normal;
}

/* white popup text */
.z-window-header, .z-window-icon {
    color: white;
}

/* readonly labels appear in grey by default, keep the black color */
.z-combobox-input[readonly], .z-timepicker-input[readonly] {
    color: inherit;
    background: inherit;
}

/* default chosen box placeholder is black, change it to gray */
.z-chosenbox-input {
    color: #a8a8a8;
}

/* change list group header background as it is white by default */
.z-listgroup.z-listgroup-open .z-listgroup-inner {
    background: #daf1ff;
}

/* remove menubar border */
.z-menubar {
    border: none;
}

/* remove blue vertical borders in grids columns headers */
.z-column:not(:first-child) {
    border-left: 1px solid #fff;
}

/* remove blue bottom border in grids columns headers */
.z-column {
    border-bottom: 1px solid #fff;
}

.z-columns-bar {
    border: none;
}

/* remove blue vertical borders in list views columns headers */
.z-listheader:not(:first-child) {
    border-left: 1px solid white;
    border-bottom: 1px solid white;
}

/* reduce menubar padding */
.z-menubar {
    padding: 6px 12px;
}

/* change rating icon size, color and hover style */
.z-rating > .z-rating-icon {
    font-size: 16pt;
}

.z-rating > .z-rating-selected {
    color: #018ccd;
}

.z-rating > .z-rating-hover {
    color: #018ccd;
    text-shadow: none;
    font-weight: bold;
}

/* change menu bars appearance to look like buttons in list views */
.z-listcell-content .z-menubar {
    background: none;
    padding: 0;
    vertical-align: middle;
    display: inline-block;
    font-size: inherit;
}

.z-listcell-content .z-menubar .z-menu .z-menu-content, .z-listcell-content .z-menubar .z-menu .z-menuitem-content {
    background: #018ccd;
    color: white;
    padding: 10px 16px;
}

.z-listcell-content .z-menubar .z-menu .z-menu-content .z-menu-icon {
    position: inherit;
    right: inherit;
    top: inherit;
}

/* reset font size for icon buttons so that it does not create extra height compared to text buttons */
.z-button i {
    font-size: inherit;
}

.z-comboitem, .z-comboitem-button {
    white-space: normal;
}

/*endregion*/

/*region Unil theme overrides based on ZK iceblue theme */
body.iceblue .u-header, body.iceblue .z-window {
    background: #018ccd;
}

body.iceblue .z-listheader, body.iceblue .z-listheader:active {
    background: #018ccd;
    border-bottom: none;
}

body.iceblue .z-button:not(:disabled) {
    background-color: #018ccd;
}

body.iceblue .z-a {
    color: #018ccd;
}

body.iceblue .z-toolbarbutton:hover {
    background-color: #018ccd;
}

body.iceblue .z-chosenbox-item {
    background-color: #018ccd;
}

body.iceblue .z-combobox-button:active, .z-bandbox-button:active, .z-datebox-button:active, .z-timebox-button:active, .z-spinner-button:active {
    background-color: #018ccd;
}

body.iceblue .z-menu-content:active, .z-menuitem-content:active {
    background-color: #018ccd;
}

body.iceblue .z-menu-selected > .z-menu-content {
    background-color: #018ccd;
}

body.iceblue .z-menupopup .z-menu-content:active, .z-menupopup .z-menuitem-content:active {
    background-color: #018ccd;
}

body.iceblue .z-tab-selected {
    border-bottom: 2px solid #018ccd;
}

body.iceblue .z-tab-selected .z-tab-text {
    color: #018ccd;
}

body.iceblue .z-column {
    background: #018ccd;
}

body.iceblue .z-listgroup.z-listgroup-open .z-listgroup-inner .z-listgroup-icon, .z-listgroup.z-listgroup-open .z-listgroup-inner .z-listcell-content {
    color: #018ccd;
}

body.iceblue .z-listgroup.z-listgroup-open .z-listgroup-inner {
    border-bottom: 2px solid #018ccd;
}

body.iceblue input[type="checkbox"]:checked {
    background-color: #018ccd;
}

body.iceblue .z-checkbox-switch-on > .z-checkbox-mold {
    background-color: #018ccd;
}

body.iceblue input[type="radio"]:checked::before {
    background-color: #018ccd;
}

body.iceblue .z-calendar-selected {
    background: #018ccd;
}

body.iceblue .z-grid-header {
    background: #018ccd;
}

body.iceblue .z-paging-button:active {
    background-color: #018ccd;
}

/*endregion*/

/*region Toolbar*/
.u-toolbar.z-toolbar {
    padding: 6px 0;
}

.u-toolbar .u-flag img {
    height: 13px;
    width: 20px;
}

.u-toolbar .z-toolbarbutton, .u-toolbar .z-toolbarbutton-content > * {
    margin: 0;
}

.u-toolbar .z-toolbarbutton {
    padding: 2px 6px;
}

.u-toolbar a:not([href]):hover {
    color: white;
}

.u-toolbar a:not([href]) {
    color: rgba(0,0,0,0.57);
}

/*endregion*/

/*region i18n text */

/* vertical align images with fields */
.i18n-content .z-hlayout-inner {
    vertical-align: middle;
}

/* flag icon size */
.z-image.u-flag {
    height: 19px;
    width: 30px;
}

/* not selected flag icon style */
.z-image.u-flag-not-selected {
    cursor: pointer;
    height: 14px;
    opacity: 0.8;
    width: 22px;
}

/*endregion*/

/*region Step bar*/
.stepbar {
    display: flex;
}

.stepbar > .step {
    display: inline-block;
    flex: 1;
    position: relative;
    text-align: center;
    z-index: 0;
}

.stepbar > .step > .step-icon {
    background-color: LightGrey;
    border-radius: 25px;
    color: DarkGray;
    display: inline-block;
    font-size: 22px;
    height: 50px;
    line-height: 50px;
    transition: all 0.5s;
    width: 50px;
}

.stepbar > .step:before {
    background-color: LightGrey;
    content: ' ';
    display: block;
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 18px;
    z-index: -1;
}

.stepbar > .step.previous {
    cursor: pointer;
}

.stepbar > .step > .step-label {
    color: DarkGray;
    display: block;
    padding: 5px;
}

.stepbar > .step.current > .step-label, .stepbar > .step.previous > .step-label {
    color: inherit;
}

body.iceblue .stepbar > .step.previous:before {
    background-color: #018ccd;
}

body.iceblue .stepbar > .step.current:before {
    background-image: linear-gradient(to right, #018ccd, #01a5f2 50%, LightGrey);
}

body.iceblue .stepbar > .step:first-child.current:before {
    background-image: linear-gradient(to right, #01a5f2, LightGrey);
}

body.iceblue .stepbar > .step:last-child.current:before {
    background-image: linear-gradient(to right, #018ccd, #01a5f2);
}

body.iceblue .stepbar > .step.previous > .step-icon {
    background-color: #018ccd;
    color: white;
}

body.iceblue .stepbar > .step.current > .step-icon {
    background-color: #018ccd;
    color: white;
}

body.iceblue .z-listhead-bar {
    background: #018ccd;
    border-left: 1px solid #018ccd;
    border-bottom: 1px solid #018ccd;
}

/*endregion*/

/*region Other*/

/* required fields style */
.label-required:after {
    color: #e32;
    content: '*';
    display: inline;
}

.label-required-before:before {
    display: inline;
    color: #e32;
    content: '* ';
}

.label-required-before {
    font-style: italic;
    font-size: 0.9em;
}

/* badges */
.badge-status {
    padding: .8em 1em;
    text-transform: uppercase;
    width: 120px;
}

.badge-letter {
    padding: .8em 1em;
    text-transform: uppercase;
    width: 38px;
}

.badge-email .z-label {
    font-size: inherit;
}

/* pointer cursor for clickable content */
.clickable {
    cursor: pointer;
}

/* simply apply UNIL blue color */
.blue {
    color: #018ccd;
}

/* for HTML content, display with max 5 lines (font-size * line-height * nb lines) */
.html-content-5 {
    display: inline-block;
    max-height: calc(16px * 1.5 * 5);
    overflow: auto;
    width: 100%;
}

/* for HTML content, bordered display with max 5 lines (font-size * line-height * nb lines)*/
.html-content-b-5 {
    border: 1px solid #ccc;
    display: inline-block;
    max-height: calc(16px * 1.5 * 5);
    overflow: auto;
    width: 100%;
}

/* for HTML content, display with max 5 lines (px font-size * line-height * nb lines * em font size)*/
.html-content-s-5 {
    display: inline-block;
    max-height: calc(16px * 1.5 * 5 * 0.85);
    overflow: auto;
    width: 100%;
}

/* to get bigger blue icons */
.big-blue-icon {
    color: #018ccd;
    font-size: 2em;
}

/* apply blue background */
.u-bg-blue {
    background-color: #018ccd;
}

/* remove groupbox caption left margin when using an icon */
.u-groupbox-chevron .z-caption-content > .z-label {
    margin-left: 0;
}

/* display a up chevron icon when groupbox is open */
.z-groupbox.u-groupbox-chevron .z-caption-content .z-icon-:before {
    content: "\f139"
}

/* display a down chevron icon when groupbox is closed */
.z-groupbox.z-groupbox-collapsed.u-groupbox-chevron .z-caption-content .z-icon-:before {
    content: "\f13a"
}

/*endregion*/