/* Custom UNIL styles */
/* custom-base.css must be included along with this file, as it defines root variables */

/* region Custom button background colors */
.u-bg-success,
.u-bg-success:not([disabled]):focus {
    background-color: var(--unil-positive-color-500);
}

.u-bg-success:not([disabled]):hover {
    background-color: var(--unil-positive-color-400);
}

.u-bg-success:not([disabled]):active {
    background-color: var(--unil-positive-color-600);
}

.u-bg-secondary,
.u-bg-secondary:not([disabled]):focus {
    background-color: var(--unil-gray-color-700);
}

.u-bg-secondary:not([disabled]):hover {
    background-color: var(--unil-gray-color-600);
}

.u-bg-secondary:not([disabled]):active {
    background-color: var(--unil-gray-color-800);
}

.u-bg-warning,
.u-bg-warning:not([disabled]):focus {
    background-color: var(--unil-warning-color-600);
}

.u-bg-warning:not([disabled]):hover {
    background-color: var(--unil-warning-color-500);
}

.u-bg-warning:not([disabled]):active {
    background-color: var(--unil-warning-color-700);
}

.u-bg-danger,
.u-bg-danger:not([disabled]):focus {
    background-color: var(--unil-negative-color-600);
}

.u-bg-danger:not([disabled]):hover {
    background-color: var(--unil-negative-color-500);
}

.u-bg-danger:not([disabled]):active {
    background-color: var(--unil-negative-color-700);
}

/* endregion */

/* region Custom background colors */
.u-bg-purple {
    background-color: #5d65cf;
}

.u-bg-orchid {
    background-color: #8C2B86;
}

.u-bg-darkcyan {
    background-color: #245b67;
}

.u-bg-apricot {
    background-color: #d69452;
}

.u-bg-olive {
    background-color: #b3ac43;
}

.u-bg-bronze {
    background-color: #9c6449;
}

.u-bg-lightgray {
    background-color: rgb(239 243 246)
}

.u-bg-blue-400 {
    background-color: var(--unil-main-color-400);
}

/* endregion */

/* region Sticky banner for dev and local environnement */
.u-top-banner {
    border-bottom: 1px solid #02618e;
    color: #fff;
    height: 35px;
    padding: 5px;
    position: fixed;
    text-align: center;
    text-transform: uppercase;
    top: 0;
    width: 100%;
    white-space: nowrap;
    z-index: 9999;
}

/* to shift content under the banner */
.u-top-banner-margin {
    margin-top: 35px;
}

/* endregion */

/* region Custom big colored icons */
.u-big-icon-cyan {
    color: darkcyan;
    font-size: 60px;
}

.u-big-icon-violet {
    color: darkslateblue;
    font-size: 60px;
}

.u-big-icon-yellow {
    color: darkgoldenrod;
    font-size: 60px;
}

/* endregion */

/* region Flags inside text boxes for i18n fields */
/* add fr icon inside input for french content */
.u-input-fr-icon {
    /*noinspection CssUnknownTarget*/
    background-image: url('/img/france.png');
    background-position: 10px 12px;
    background-repeat: no-repeat;
    background-size: 22px 14px;
    padding-left: 40px !important; /* to not be overridden by textarea padding for multiline fields */
}

/* add en icon inside input for english content */
.u-input-en-icon {
    /*noinspection CssUnknownTarget*/
    background-image: url('/img/england.png');
    background-position: 10px 12px;
    background-repeat: no-repeat;
    background-size: 22px 14px;
    padding-left: 40px !important; /* to not be overridden by textarea padding for multiline fields */
}

/* endregion */

/* region Header titles */
.u-h100 {
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
}

.u-h200 {
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
}

.u-h300 {
    font-size: 17px;
    font-weight: 700;
    line-height: 26px;
}

.u-h400 {
    font-size: 17px;
    font-weight: 700;
    line-height: 26px;
}

@media (min-width: 640px) {
    .u-h400 {
        font-size: 19px;
        line-height: 28px;
    }
}

.u-h500 {
    font-size: 22px;
    font-weight: 700;
    line-height: 30px;
}

@media (min-width: 640px) {
    .u-h500 {
        font-size: 23px;
        letter-spacing: -.2px;
        line-height: 30px;
    }
}

.u-h600 {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.5px;
    line-height: 32px;
}

@media (min-width: 640px) {
    .u-h600 {
        font-size: 28px;
        letter-spacing: -.5px;
        line-height: 34px;
    }
}

.u-h700 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.5px;
    line-height: 34px;
}

@media (min-width: 640px) {
    .u-h700 {
        font-size: 36px;
        letter-spacing: -.7px;
        line-height: 44px;
    }
}

.u-h800 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -.6px;
    line-height: 36px;
}

@media (min-width: 640px) {
    .u-h800 {
        font-size: 44px;
        letter-spacing: -1px;
        line-height: 50px;
    }
}

.u-h900 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1.2px;
    line-height: 46px;
}

@media (min-width: 640px) {
    .u-h900 {
        font-size: 62px;
        letter-spacing: -2px;
        line-height: 68px;
    }
}

.u-h1000 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1.2px;
    line-height: 46px;
}

@media (min-width: 1024px) {
    .u-h1000 {
        font-size: 88px;
        line-height: 92px;
        letter-spacing: -2.5px;
    }
}

/* endregion */

/* region Font sizes */
.u-3xs {
    font-size: 13px;
    line-height: 18px;
}

.u-2xs {
    font-size: 14px;
    line-height: 20px;
}

.u-xs {
    font-size: 15px;
    line-height: 22px;
}

.u-sm {
    font-size: 17px;
    line-height: 26px;
}

.u-base {
    font-size: 19px;
    line-height: 28px;
}

.u-lg {
    font-size: 20px;
    line-height: 28px;
}

.u-xl {
    font-size: 22px;
    line-height: 30px;
}

.u-2xl {
    font-size: 23px;
    line-height: 30px;
}

.u-3xl {
    font-size: 25px;
    line-height: 32px;
    letter-spacing: -0.5px;
}

.u-4xl {
    font-size: 28px;
    line-height: 34px;
    letter-spacing: -0.5px;
}

.u-5xl {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.6px;
}

.u-6xl {
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.7px;
}

.u-7xl {
    font-size: 42px;
    line-height: 46px;
    letter-spacing: -1.2px;
}

.u-8xl {
    font-size: 44px;
    line-height: 50px;
    letter-spacing: -1px;
}

.u-9xl {
    font-size: 62px;
    line-height: 68px;
    letter-spacing: -2px;
}

.u-10xl {
    font-size: 88px;
    line-height: 92px;
    letter-spacing: -2.5px;
}

/* endregion */

/* region Page header */
.u-header-container {
    background-color: var(--unil-main-color);
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1280px) {
    .u-header-container {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

@media (min-width: 640px) {
    .u-header-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.u-header-wrapper {
    display: flex;
    flex-direction: column;
    padding-bottom: 1rem;
    padding-top: 1rem;
    width: 100%;
}

@media (min-width: 640px) {
    .u-header-wrapper {
        gap: 1.5rem;
        padding-top: 1.5rem;
    }
}

.u-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.u-header-desktop-icons-wrapper {
    align-items: center;
    display: none;
    gap: 2.5rem;
}

@media (min-width: 640px) {
    .u-header-desktop-icons-wrapper {
        display: flex;
    }
}

.u-header-mobile-icons-wrapper {
    align-items: center;
    display: flex;
    gap: 2.5rem;
    height: 3rem;
}

@media (min-width: 640px) {
    .u-header-mobile-icons-wrapper {
        display: none;
    }
}

.u-header-mobile-menu {
    background-color: var(--unil-main-color);
}

.u-header-mobile-menu-navigation {
    color: rgb(10 31 48);
    display: flex;
    flex-direction: column;
    font-size: 22px;
    font-weight: 700;
    gap: 1.5rem;
    line-height: 30px;
    padding: 2.5rem 1rem 1.5rem;
}

.u-header-mobile-menu-app-name {
    align-items: center;
    background-color: rgb(226 233 238);
    color: rgb(10 31 48);
    display: flex;
    font-size: 15px;
    line-height: 22px;
    padding: 1rem;
    width: 100%;
}

.u-header-mobile-menu-item {
    font-size: 22px;
    font-weight: 700;
    line-height: 30px;
}

.u-header-mobile-menu-link {
    color: white;
    text-decoration: none;
}

.u-header-language-selector {
    display: flex;
}

.u-header-language-selector a,
.u-header-language-selector a:hover {
    align-items: center;
    background-color: var(--unil-main-color);
    border-radius: 1rem;
    color: white;
    display: flex;
    font-size: 15px;
    height: 1.5rem;
    justify-content: center;
    line-height: 22px;
    text-decoration: none;
    width: 2.5rem;
}

.u-header-language-selector > a.u-language-selected {
    background-color: rgb(10 31 48 / .3);
}

.u-header-icons-wrapper {
    align-items: center;
    border-left-color: white;
    border-left-style: solid;
    border-left-width: 1px;
    border-right-color: white;
    border-right-style: solid;
    border-right-width: 1px;
    display: none;
    gap: 2.5rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

@media (min-width: 640px) {
    .u-header-icons-wrapper {
        display: flex;
    }
}

.u-header-user-bar {
    align-items: center;
    border-top-color: rgba(255, 255, 255, 0.15);
    border-top-style: solid;
    border-top-width: 1px;
    display: none;
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 640px) {
    .u-header-user-bar {
        display: flex;
    }
}

.u-header-user-bar-app-name {
    color: white;
    font-size: var(--unil-font-size);
    line-height: 26px;
    padding-top: .75rem;
}

@media (min-width: 640px) {
    .u-header-user-bar-app-name {
        font-size: 19px;
        line-height: 28px;
    }
}

.u-header-user-bar-menu {
    border-top-color: transparent;
    border-top-style: solid;
    border-top-width: 2px;
    color: white;
    font-size: var(--unil-font-size);
    font-weight: 700;
    line-height: 26px;
    padding-top: .75rem;
    position: relative;
}

.u-header-user-bar-menu:hover {
    border-top-color: white;
}

@media (min-width: 640px) {
    .u-header-user-bar-menu {
        font-size: 19px;
        line-height: 28px;
    }
}

.u-header-user-bar-menu-link {
    align-items: center;
    color: white;
    display: flex;
    gap: .25rem;
    text-decoration: none;
}

.u-losange {
    background-color: white;
    height: .5rem;
    margin-top: .75rem;
    transform: translate(0, 0) rotate(45deg) skew(0) skewY(0) scaleX(1) scaleY(1);
    width: .5rem;
}

.u-parallax-banner {
    max-height: 250px;
    overflow: hidden;
}

/* endregion */

/* region Secondary button */
.u-btn-secondary,
.u-btn-secondary:focus {
    background-color: transparent;
    border-color: rgb(212 221 228);
    box-shadow: unset;
    color: rgb(10 31 48);
}

.u-btn-secondary:hover {
    background-color: transparent;
    border-color: rgb(157 168 177);
    color: rgb(10 31 48);
}

.u-btn-secondary:active {
    background-color: rgb(239 243 246);
    border-color: rgb(114 128 139);
}

/* endregion */

/* region Animations */
.u-pulse {
    animation: pulse 2s ease-out;
    animation-iteration-count: infinite;
}

.u-bell {
    animation: bell 1s 1s both infinite;
    transition: 0.3s;
}

@keyframes pulse {
    40% {
        transform: scale3d(1, 1, 1);
    }
    50% {
        transform: scale3d(1.3, 1.3, 1.3);
    }
    55% {
        transform: scale3d(1, 1, 1);
    }
    60% {
        transform: scale3d(1.3, 1.3, 1.3);
    }
    65% {
        transform: scale3d(1, 1, 1);
    }
}

@keyframes bell {
    0% {
        transform: rotate(0);
    }
    10% {
        transform: rotate(30deg);
    }
    20% {
        transform: rotate(0);
    }
    80% {
        transform: rotate(0);
    }
    90% {
        transform: rotate(-30deg);
    }
    100% {
        transform: rotate(0);
    }
}

/* endregion */

/* region Forms */
.u-form-error {
    color: rgb(226 70 79);
    font-size: 15px !important; /* important to override ZK default z-label */
    line-height: 22px;
    margin-top: .375rem;
}

.u-field-error {
    border-color: rgb(226 70 79);
    border-width: 2px;
}

.u-form-label {
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
    margin-bottom: .375rem;
}

.u-form-hint {
    color: rgb(106 120 131);
    display: block;
    font-size: 15px;
    line-height: 22px;
    margin-top: .375rem;
}

/* to display asterisk next to required fields */
.u-label-required:after {
    display: inline;
    color: red;
    content: ' *';
}

/* endregion */

/* region Helpers */
/* to be used on clickable elements */
.u-cursor-pointer {
    cursor: pointer;
}

/* disabled content, i.e. for ckeditor */
.u-content-disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* to display conditions inside scrollable content */
.u-mh-200px {
    max-height: 200px;
    overflow-y: auto;
}

/* multiline ellipsis after 5 lines of text */
.u-crop-text-5 {
    display: -webkit-box;
    line-clamp: 5 "…";
    line-height: 1.3;
    min-height: calc(1.3 * 16 * 5px);
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

/* endregion */

/* region Notifications */
.u-app-notifications {
    max-width: 520px;
}

.u-app-notifications .list-group {
    max-height: 600px;
    overflow: auto;
}

/* endregion */

/* region Smaller badges */
.u-badge-small {
    font-size: 14px;
    line-height: 16px;
    padding: 3px 6px;
}

/* endregion */