/*

    !!! DO NOT CHANGE - USE OVERRIDE RULES TO TWEAK LAYOUT / COLOURS !!!

*/
/*
	POPUPS / DIALOGS 
*/
html.fullscreen-component-active,
body.fullscreen-component-active,
html.fullscreen-component-active body {
    overflow-y: hidden;
}

.flexy {
    display: flex;
    align-items: center;
}

.flexy.inline {
    display: inline-flex;
    align-items: center;
}

.flexy.start {
    align-items: flex-start;
}

.flexy.end {
    align-items: flex-end;
}

body.component-active {
    overflow: hidden;
}

.popup {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    max-height: 100vh;
    background: var(--cfaf-ux-popup-background);
    overflow-y: scroll;
}

.popup:before {
    content: ' ';
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    min-height: 100%;
    z-index: -1;
}

.popup > div {
    display: flex;
    flex-direction: column;
    background: var(--cfaf-ux-popup-background);
    margin: var(--cfaf-ux-popup-margin);
}

.popup > div > * {
    width: 100%;
}
.popup > div > h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--cfaf-ux-popup-title-color);
    background: var(--cfaf-ux-popup-title-background);
    height: var(--cfaf-ux-popup-title-height);
    overflow: hidden;
    margin-bottom: 0;
    padding: 16px 32px;
    border-bottom: 1px solid #EDEDED;
}

.popup > div > h2 .close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5em;
}

/*
    Fixed controls row on popup dialogs so always visible despite content size
*/
.popup > div > .controls {
    width:100%;
    justify-content:space-between;
    display: flex;
    align-items: center;
    height: auto !important;
    overflow: hidden !important;
    margin: var(--cfaf-ux-popup-margin);
    padding: 1em 2em !important;
    background: var(--cfaf-ux-popup-controls-background);
    border-radius: var(--cfaf-ux-popup-controls-border-radius);
}

.popup > div > .controls > div {
    display: flex;
    align-items: center;
    gap:16px;
}

.popup.fullscreen > div > .controls {
    margin: var(--cfaf-ux-popup-fullscreen-margin);
}

.popup .controls button {
    padding: 0.5em 1em;
}

.popup .controls > *:not(:last-child) {
    margin-right: 1em;
}

.popup .close {
    justify-self: flex-end;
    margin-left: auto;
}

.popup > div > .content {
    padding: var(--cfaf-ux-popup-content-padding);
    height: calc(100vh - var(--cfaf-ux-popup-content-reserved-height));
}

/*
	TOOLBARS -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
.toolbar {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    background: #485d6a;
    padding: 0.5em;
    position: fixed;
    left: 0;
    top: 40px;
    z-index: 1;
}

.toolbar.owned-by-title {
    position: absolute;
    right: 10px;
    top: 10px;
}

.popup .toolbar.owned-by-title {
    right: 60px;
    top: 5px;
}

.popup .toolbar {
    position: relative;
    top: 0;
}

.popup > div > .toolbar {
    background: #404040;
}

.toolbar li {
    display: inline-flex;
    margin-right: 10px;
    gap:16px;
}

.toolbar li:last-child {
    margin-right: 0;
}

/*
	UBIQUITOUS JQUI -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
input[type=text].hasDatepicker + .icon_datepicker {
    padding-left: 5px;
}

.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
    width: 50%;
    padding: 0.2em;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span {
    background-image: unset !important;
    text-indent: unset !important;
    left: unset !important;
    top: unset !important;
    margin: 0 !important;
    position: static !important;
    width: unset !important;
    height: unset !important;
}

.ui-datepicker .ui-datepicker-prev span:before,
.ui-datepicker .ui-datepicker-next span:before {
    font-family: 'Font Awesome 5 Pro';
    font-size: 2em;
}

.ui-datepicker .ui-datepicker-prev span:before {
    content: '\f053';
}

.ui-datepicker .ui-datepicker-next span:before {
    content: '\f054';
}

.ui-datepicker-container {
    white-space: nowrap;
}


/*
	ANIMATIONS ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
.waiter::before {
    content: 'Loading';
}

.waiter::after {
    content: ' ';
    animation: animLoadingDots 1s ease infinite;
}

.waiter.with-message::before {
    content: '';
}

table.waiting {
    overflow: hidden;
    position: relative;
}

table.waiting thead:before {
    content: ' ';
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

/* ================================================================================================================================================================ */
/* ERRORS */
/* ================================================================================================================================================================ */
.efs {
    padding: 0 !important;
    margin: 0 !important;
    flex-basis: 100%;
}

.efs:empty {
    display: none;
}

.ef {
    display: none;
    padding: 12px 12px 10px 12px;
    color: #ffffff;
    border-radius: 3px;
    margin-bottom: 0.25em;
    background: #b52c46;
}

.wf {
    display: none;
    padding: 0.5em;
    background: rgb(249, 197, 0);
    color: #000000;
    border-radius: 2px;
    margin-bottom: 0.25em;
}

.if {
    display: none;
    padding: 5px !important;
    background: #4f1eff;
    color: #ffffff;
    border-radius: 2px;
    margin-bottom: 5px;
}

.if:before {
    font-family: "Font Awesome 5 Pro";
    content: '\f05a';
    padding-right: 10px;
}

.ef.static,
.wf.static,
.if.static {
    display: inherit;
}

/*
    ========================================================================================================================================================================================
*/
.flash-message {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 100;
    border: 1px solid #b6acc4;
    border-top: none;
    background: #ead3ff;
    z-index: 1000;
    transition: all ease 3s;
    opacity: 0;
    top: 0;
    left: calc(50% - 400px);
    width: 800px;
    height: 0;
    overflow: hidden;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

.flash-message.show {
    height: 60px;
    transition: all ease 0.2s;
    opacity: 1;
}

.flash-message.dock-bottom {
    bottom: 0;
    top: unset;
}

.flash-message > * {
    display: inline-block;
    padding: 33px;
}

.flash-message.fm-owned span {
    padding: 0;
}

.flash-message.fm-owned {
    position: absolute;
    top: 0;
    right: 0;
    height: 40px;
    font-size: 22px;
    background: transparent;
    border: none;
    width: unset;
    padding: 0;
    margin: 0;
}

.flash-message.fm-owned:before {
    content: none;
}
/*
    ========================================================================================================================================================================================
*/
.pager {
    width: 100%;
    display: flex;
    align-items: center;
}

.pager > * {
    display: flex;
    align-items: center;
}

.pager .pager-pages {
    margin-left: 20px;
    margin-right: 10px;
}

.pager .pager-info {
    margin-left: 10px;
    margin-right: 20px;
}

.pager .pager-pages > *:not(:last-child),
.pager .pager-info > *:not(:last-child) {
    margin-right: 10px;
}

.pager .buttons button {
    font-family: 'Font Awesome 5 Pro';
    font-size: 22px;
}

.pager > .buttons .first:before,
.pager > .goto-first:before {
    content: '\f048';

}

.pager > .buttons .prev:before,
.pager > .buttons .goto-prev:before {
    content: '\f0d9';
}

.pager > .buttons .next:before,
.pager > .buttons .goto-next:before {
    content: '\f0da';
}

.pager > .buttons .last:before,
.pager > .buttons .goto-last:before {
    content: '\f051';
}

.pager .page-count:after,
.pager .record-count,
.pager > .buttons .first,
.pager > .goto-first,
.pager > .buttons .last,
.pager > .buttons .goto-last {
    display:none!important;
}

.pager input[type=text] {
    outline: none;
    background: #293583;
    color: #FFFFFF;
    text-align: center;
    width: 4em !important;
    font-size: 1rem;
    min-height: 32px;
    padding: 0 0.6rem 0.3rem 0.6rem;
    border: none;
    border-radius: 4px;
    transition: 0.5s;
    padding: 6px 10px 2px 10px;
}

.pager input[type=text]:focus {
    background: #8E2684;
}

.pager button, 
.pager input[type=text] {
    height:unset!important;
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    min-height: unset;
    padding: 8px!important;
    border-radius: 0;
}

.waiting .pager,
.pager.waiting {
    min-height: 2px;
    animation: animPagerWaiting 2s infinite;
}

button.toggle {
    background: #eeeeee;
    color: #202020;
}

button.toggle.checked {
    background: #000000;
    color: #ffffff;
}

/* ================================================================================================================================================================ */
/* ANIMATIONS */
/* ================================================================================================================================================================ */
@keyframes animPagerWaiting {
    0% {
        background: linear-gradient(315deg, #505050, #ffffff 0%, #505050)
    }

    10% {
        background: linear-gradient(315deg, #505050, #ffffff 10%, #505050)
    }

    20% {
        background: linear-gradient(315deg, #505050, #ffffff 20%, #505050)
    }

    30% {
        background: linear-gradient(315deg, #505050, #ffffff 30%, #505050)
    }

    40% {
        background: linear-gradient(315deg, #505050, #ffffff 40%, #505050)
    }

    50% {
        background: linear-gradient(315deg, #505050, #ffffff 50%, #505050)
    }

    60% {
        background: linear-gradient(315deg, #505050, #ffffff 60%, #505050)
    }

    70% {
        background: linear-gradient(315deg, #505050, #ffffff 70%, #505050)
    }

    80% {
        background: linear-gradient(315deg, #505050, #ffffff 80%, #505050)
    }

    90% {
        background: linear-gradient(315deg, #505050, #ffffff 90%, #505050)
    }

    100% {
        background: linear-gradient(315deg, #505050, #ffffff 100%, #505050)
    }
}

@keyframes animFadeIn {
    0% {
        display: none;
        opacity: 0;
    }

    1% {
        opacity: 0;
        display: inherit;
    }

    100% {
        opacity: 1;
        display: inherit;
    }
}

@keyframes animFadeOut {
    0% {
        opacity: inherit;
        display: inherit;
    }

    99% {
        opacity: 0;
        display: inherit;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

@keyframes animLoadingDots {
    0% {
        content: ' '
    }

    25% {
        content: '.'
    }

    50% {
        content: '..'
    }

    75% {
        content: '...'
    }

    100% {
        content: ' '
    }
}

@media screen and (max-height:800px) {

    .popup.confirm, .popup.action-conpleted {
        align-items: flex-start;
    }
}