/*
	POPUPS / DIALOGS ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
.flexy {
    display: flex;
    align-items: center;
}

.flexy.inline {
    display: inline-flex;
    align-items: center;
}

body.component-active {
    overflow: hidden;
}

.popup {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    min-height: 100vh;
    max-height: 100vh;
    z-index: 20;
    background: var(--cfaf-ux-popup-background);
    overflow-y: auto;
}

.popup:before {
    content: ' ';
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    min-height: 100%;
    z-index: -1;
}

span.popup-title {
    width: 95%;
}

.popup > div > h2 {
    width: 100%;
    top: 0;
    background: var(--cfaf-ux-popup-title-background);
    color: var(--cfaf-ux-popup-title-color);
    height: 3rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 10px;
    margin-bottom: 0;
    position: sticky;
}

.popup.content {
    overflow-y: auto;
}

.popup.confirm,
.popup.action-conpleted {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(70, 36, 98, 0.9);
}

.popup.confirm > .content,
.popup.action-conpleted > .content {
    height: fit-content;
    border: 3px solid #472563;
    padding: 24px 24px 24px 24px;
}

.popup.confirm > div > div:not(.waiter),
.popup.action-conpleted > div > div:not(.waiter) {
    height: unset;
}

.popup > div {
    background: var(--cfaf-ux-popup-background);
    margin: var(--cfaf-ux-popup-margin);
}

.popup.fullscreen > div {
    margin: 0;
    display: flex;
    align-items: stretch;
    flex-direction: column;
}

.popup.fullscreen:after {
    background-color: green;
}

.popup > div > h1,
.koa-ui-dynamic-popup > div > h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #472563;
    height: var(--cfaf-ux-popup-title-height);
    overflow: hidden;
    margin-bottom: 0;
    padding: 16px 32px;
    border-bottom: 1px solid #EDEDED;
}

.popup > div > h1 .close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5em;
}

.popup > div > div:not(.waiter) {
    position: relative;
    overflow-y: auto; /* Content will scroll */
    padding: 2em;
    height: calc(100vh - 9rem);
}

/*.popup.fullscreen > div > div:not(.waiter) {
    height: calc(100vh - var(--cfaf-ux-popup-title-height) - var(--cfaf-ux-popup-fullscreen-margin) - var(--cfaf-ux-popup-fullscreen-margin) - 6em);
}*/

.popup > div > .controls {
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 6rem !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);
    position: sticky !important
}

.popup.fullscreen > div > .controls {
    margin: var(--cfaf-ux-popup-fullscreen-margin);
}

.popup .controls button {
    padding: 0.5em 1em;
    border-color: white;
    background-color: white;
    color: var(--cfaf-ux-popup-controls-foreground);
    transition-duration: 0.5s;
}

.popup .controls button:disabled {
    opacity: 20%;
}

.popup .controls > *:not(:last-child) {
    margin-right: 1em;
}

.popup .close:before {
    font-family: "FontAwesome";
    content: '\f00d';
    font-style: normal;
    line-height: 1em;
}

.popup .close {
    justify-self: flex-end;
    margin-left: auto;
    font-size: 1em;
    border-radius: 50%;
    background-color: white;
    color: var(--cfaf-ux-popup-controls-foreground);
    border: none;
    padding: 1px 4px 0 4px;
    height: 1.5em;
    width: 1.5em;
}
/*
	TOOLBARS -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar.owned-by-title {
    position: absolute;
    right: 10px;
    top: 10px;
}

.popup .toolbar.owned-by-title {
    right: 60px;
    top: 5px;
}

.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 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/

@keyframes waiter {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}

@keyframes contentwaiter {
    0% {
        clip-path: rect(0 120px 0 0);
        opacity: 0.5;
    }

    25% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    75% {
        clip-path: rect(0 120px 100px 0);
        opacity: 1;
    }

    76% {
        clip-path: rect(0 120px 0 0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.waiter {
    margin: 6px;
}

.waiter:before {
    display: inline-block;
    font-family: "Font Awesome 6 Pro";
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -webkit-animation: zoomIn 0.4s ease-out forwards, waiter 1.5s infinite 0.3s linear;
    animation: zoomIn 0.4s ease-out forwards, waiter 1.5s infinite 0.3s linear;
    content: "\f013";
    font-style: normal;
    font-weight: normal;
    padding: 3px 3px 0px 3px;
}

.waiter.content-waiter {
    display: flex;
    align-items: center;
}

.waiter.content-waiter:before {
    clip-path: rect(0 120px 0 0);
    content: '\e1d1';
    font-weight: 900;
    color: #00000020;
    font-size: 100px;
    animation: contentwaiter 1.5s infinite 0.3s linear;
}

.waiter.content-waiter:after {
    content: 'Loading...';
    padding-left: 1em;
    color: #00000020;
    font-size: 24px;
    font-weight: 100;
}

.waiter.content-waiter + table,
.waiter.content-waiter + .waited-content {
    visibility: hidden;
}

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: 0.5em 1rem 0.6rem 1rem;
    color: #ffffff;
    border-radius: 3px;
    margin-bottom: 0.25em;
    background: #e4002b;
}

.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;
}

@media (max-width: 1024px) {
    .pager .info {
        display: none !important;
    }
}

.pager .pager-pages > *:not(:last-child),
.pager .pager-info > *:not(:last-child) {
    margin-right: 10px;
}

.pager > .goto-first:before {
    content: 'First';
}

.pager .first:before {
    font-family: "FontAwesome" !important;
    content: '\f048' !important;
    font-size: 1em;
}


.pager > .goto-prev:before {
    content: 'Prev';
}

.pager > .goto-next:before {
    content: 'Next';
}

.pager > .goto-last:before {
    content: 'Last';
}

.pager .last:before {
    font-family: "FontAwesome" !important;
    content: '\f051' !important;
    font-size: 1em;
}

.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;
    letter-spacing: 1px;
    min-height: unset;
    padding: 8px !important;
    border-radius: 0;
}

.pager .buttons button {
    border-radius: 25px;
}

.waiting .pager,
.pager.waiting {
    min-height: 2px;
    animation: animPagerWaiting 2s infinite;
}
/* ================================================================================================================================================================ */
/* 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;
    }
}


@media screen and (max-height:800px) {

    .popup.confirm, .popup.action-conpleted {
        align-items: flex-start;
    }
}
