html {
    --eta-yellow: #f8ba00;
    --eta-yellow-dark: #BC8B00;
    --eta-gray-darker: #8994A4;
    --eta-gray-dark: #1a1a1a;
    --eta-red: #DF3331;
    font-family: "Montserrat", sans-serif !important;
    color: var(--eta-gray-dark) !important;
    --pf-v5-global--primary-color--100: var(--eta-yellow);
    --pf-v5-global--primary-color--200: var(--eta-yellow-dark);
    --pf-v5-global--primary-color--light-100: var(--eta-yellow);
    --pf-v5-global--primary-color--dark-100: var(--eta-yellow-dark);
    --pf-v5-global--BorderRadius--sm: 0;
    --pf-v5-global--BorderRadius--lg: 0;
    --pf-v5-global--danger-color--200: var(--eta-red);
    --pf-v5-global--warning-color--100: var(--eta-yellow);
    --pf-v5-global--palette--gold-50: #FFEBCC;
    --pf-v5-global--palette--red-50: #FFCCD5;
}

body.hide-header-footer #header, body.hide-header-footer #footer {
    display: none;
}

#header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#reset-login {
    background-color: unset;
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
}

#reset-login:hover span {
    text-decoration: underline;
}

.back-icon::after {
    font-size: 1.125rem;
    line-height: 1;
    content: url("../img/arrow-narrow-left.svg") !important;
}

.back-icon {
    height: fit-content;
    line-height: 1;
}

h1 {
    font-size: 2.125rem;
}

h3 {
    font-size: 1.125rem;
    font-weight: bold;
}

*:not(.fa, .fas) {
    font-family: "Montserrat", sans-serif !important;
    --pf-v5-c-form-control--Color: #1A1A1A;
}

#kc-header-wrapper {
    display: none;
}

.login-pf body {
    background: var(--eta-white-dirty);
    display: flex;
    flex-direction: column;
}

.login-pf-header {
    justify-content: space-between;
}

.login-pf-page {
    flex-grow: 1;
}

.pf-v5-c-login {
    padding: 0;
}

.pf-v5-c-login__container {
    margin: 0 auto;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: hidden;
    grid-column-gap: 0;
    padding: 0;
}

.pf-v5-c-login__container > * {
}

.pf-v5-c-login__container .right {
    z-index: 999;
}

.pf-v5-c-login__container  {
    background-color: #EFEFEF;
}

.pf-v5-c-login__container .left {
    background-color: #EFEFEF;
    color: #1A1A1A;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.pf-v5-c-login__container .left .content {
    position: relative;
    overflow: auto;
    min-height: fit-content;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pf-v5-c-login__container .left .content::-webkit-scrollbar {
    display: none;
}

.pf-v5-c-login__container .left .pf-v5-c-login__main-body {
    opacity: 0;
    animation: 0.5s cubic-bezier(0.25, 1, 0.5, 1) 0.1s 1 slideInFromRight forwards;
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(30%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.pf-v5-c-login__main-header {
    display: flex;
    flex-direction: column;
    padding-bottom: 1rem;
}

.pf-v5-c-login__main-header-utilities {
    align-self: end;
    display: flex;
    align-items: center;
}

.header-content {
    text-align: center;
    padding-bottom: 3rem;
}

.header-content-img {
    min-width: 164px;
    width: 11.5rem;
    margin: 20px 0;
}

.header-content-title {
    font-family: "Montserrat", sans-serif;
    margin: 20px 0;
}

.pf-v5-c-login__container .left .content {
    padding-top: 0;
    flex-grow: 1;
}

@media (max-width: 1199px) {
    .pf-v5-c-login__container .left {
        flex-grow: 1;
        min-width: 100%;
    }

    .pf-v5-c-login__container {
        max-width: none !important;
    }

    .pf-v5-c-login__main-header, #footer {
        padding-left: 10%;
        padding-right: 10%;
    }

    .pf-v5-c-login__main-body {
        padding-left: 10%;
        padding-right: 10%;
    }

    .pf-v5-c-login__main {
        box-shadow: none !important;
        margin-block-end: 0 !important;
    }
}

@media (min-width: 1200px) {
    .pf-v5-c-login__main-header, #footer {
        padding-left: 4%;
        padding-right: 4%;
    }

    .pf-v5-c-login__main-body {
        padding-left: 12%;
        padding-right: 12%;
    }

    .pf-v5-c-login__container .right {
        flex-basis: 60%;
        height: 100%;
        min-height: 100%;
        background-color: #656046;
        background-image: url("../img/eta-background.jpg");
        background-size: cover;
        background-position: center;
    }

    .pf-v5-c-login__container .left {
        flex-basis: 40%;
    }
}

.content {
    display: flex;
    flex-direction: column;
}

.pf-v5-c-login__main-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#kc-form-login {
    gap: 0.75rem !important;
}

.pf-v5-c-button.pf-m-primary {
    color: var(--eta-gray-dark)
}

input {
    border: none;
    outline: none;
    width: 100%;
}

.pf-v5-c-form__label:has(.login-form-label) {
    padding-bottom: 0.25rem;
}

.login-form-label {
    font-weight: normal;
    margin-bottom: 0.25rem;
}

.login-form-control {
    height: 60px;
    align-items: center;

    input {
        height: 100%;
    }
}

.login-form-control:has(input[readonly]) {
    opacity: 0.5;
}

.language-select-control {
    background-color: transparent;
    display: flex;
    align-items: center;
    width: auto !important;

    * {
        width: auto !important;
    }  
}

.language-select {
    background-color: transparent !important;
    width: 120px !important;
}

/* Add svg via mask-image to change the color */
.world-icon::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--eta-gray-darker);
    -webkit-mask-image: url('../img/world.svg');
    mask-image: url('../img/world.svg');
    -webkit-mask-size: cover;
    mask-size: cover;
}

.world-icon {
    height: fit-content;
    line-height: 1;
}

.pf-v5-c-form-control__toggle-icon::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: var(--eta-gray-darker);
    -webkit-mask-image: url('../img/chevron-down.svg');
    mask-image: url('../img/chevron-down.svg');
    -webkit-mask-size: cover;
    mask-size: cover;
    margin-left: -2rem;
}

.pf-v5-c-form-control__toggle-icon {
    padding: 0 !important;
    height: fit-content;
    line-height: 1;
}

.pf-v5-c-form-control__toggle-icon svg {
    display: none;
}

.language-select-control:after, .pf-v5-c-form-control:after, .pf-v5-c-button.pf-m-control:after {
    border: none;
}

.login-form-control::before {
    width: 25px;
    height: 25px;
    margin: auto 12px;
    border: none;
}

.data-icon-show::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    background-color: var(--eta-gray-darker);
    -webkit-mask-image: url('../img/eye.svg');
    mask-image: url('../img/eye.svg');
    -webkit-mask-size: cover;
    mask-size: cover;
}

.data-icon-hide::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    background-color: var(--eta-gray-darker);
    -webkit-mask-image: url('../img/eye-off.svg');
    mask-image: url('../img/eye-off.svg');
    -webkit-mask-size: cover;
    mask-size: cover;
}

/* Still using content url because icon font displays user icon wrong */
.pf-v5-c-form-control:has(#username)::before {
    font-size: 1.5rem;
    line-height: 1;
    content: url("../img/mail.svg") !important;
}

.login-form-control:has(input[id^=password])::before {
    font-size: 1.5rem;
    line-height: 1;
    content: url("../img/lock.svg") !important;
}

.login-form-control:has(#otp)::before {
    font-size: 1.5rem;
    line-height: 1;
    content: url("../img/lock.svg") !important;
}

.login-form-control input:is(#username, #otp),
.login-form-control input[id^=password] {
    padding-left: 50px;
}

.otp-hint {
    text-align: center;
    margin-top: 4rem;
}

.login-pf-page .login-pf-header {
    display: flex;
    flex-direction: row;
}

#kc-page-title {
    margin-right: 10px;
    text-align: left;
}

#kc-username {
    margin-bottom: 10px;
}

.attempted-username {
    text-align: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.login-pf-page .login-pf-header .logo-container {
    background-image: url("../img/keycloak-logo-text.jpg");
    background-size: contain;
    width: 100px;
    background-position: center;
    background-repeat: no-repeat;
}

input[type=submit]:not(.link), button[type=submit]:not(.link) {
    color: #1A1A1A !important;
    border-radius: 0;
    font-weight: bold;
    padding: 12px;
}

input[type=submit].link, button[type=submit].link {
    background-color: transparent;
    text-decoration: underline;
    cursor: pointer;
}

button.pf-m-primary {
    width: 100%;
}

.form-group {
    display: flex;
}

#footer {
    font-size: 12px;
    align-self: end;
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
}

#footer hr {
    border-color: rgba(0, 0, 0, 0.2)
}

#footer div {
    margin-top: 8px;
}

.alert-warning {
    width: 100%;
}

.pf-v5-c-alert {
    border-block-start: none;
    display: flex;
    justify-content: center;
}

.pf-v5-c-alert__title {
    font-weight: normal;
    color: var(--eta-gray-dark);
}

.login-pf-settings {
    text-align: right;
}

.login-info {
    margin-top: 3rem;
    text-align: center;
}

.forgot-password {
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
}

a {
    color: #1A1A1A;
    text-decoration: underline;
}

a.eta-link, button.eta-link {
    color: #1A1A1A;
    text-decoration: none;
    background-size: 100% 0.2em;
    background-repeat: no-repeat;
    background-position: 0 88%;
    background-image: linear-gradient(to right, var(--eta-yellow), var(--eta-yellow));
    transition: background-size 0.25s ease;
    font-weight: bold;

    &:hover {
        color: #1A1A1A !important;
        background-size: 100% 88%;
    }
}

button:has(.eta-link)::after {
    border: none !important;
}
p:has(> .eta-link) {
    margin-top: 2rem;
    text-align: center;
}

@media (max-width: 1199px) {
    .pf-v5-c-login__main-footer-links {
        padding-left: 10% !important;
        padding-right: 10% !important;
    }

    .social-login-btn {
        padding: 0.5rem 1rem;
    }
}

@media (min-width: 1200px) {
    .social-login-btn {
        padding: 1.375rem 2.5rem;
    }
}

.pf-v5-c-login__main-footer-links-item {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.social-login-btn, .secondary-button {
    display: flex;
    align-items: center;
    font-weight: bold;
    border-width: 2px;
    border-color: var(--eta-yellow);
    border-style: solid;
    text-decoration: none !important;
    gap: 1rem;
}

.secondary-button {
    font-size: 1rem;
    padding: 1.375rem 2.5rem;
    width: fit-content;
    margin: 1rem auto;
}

.instruction {
    font-size: 1rem;
}

.login-icon::after {
    font-size: 1.5rem;
    line-height: 1;
    content: url("../img/login-2.svg") !important;
    color: var(--pf-v5-c-form-control--Color);
    font-weight: initial !important;
}

.login-icon {
    font-size: 1.5rem;
    line-height: 1;
}

#social-keycloak-oidc:hover {
    color: black;
}

#kc-update-profile-form .field-group:has(.login-form-control input[disabled]) {
    display: none;
}

.login-pf a:hover {
    color: black;
}

.login-pf a:hover span {
    text-decoration: underline !important;
}

.instruction {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.remember-me-container {
    margin-top: 0.375rem;
}

input[type=checkbox] {
    display: grid;
    place-content: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
    height: 1.875rem;
    width: 1.875rem;
}

input[type="text"][aria-invalid="true"], input[type="password"][aria-invalid="true"] {
    border: 1px solid var(--eta-red);
    
    & + span * {
        display: none;
    }
    & + span::after {
        content: "";
        display: inline-block;
        width: 24px;
        height: 24px;
        background-color: var(--eta-red);
        -webkit-mask-image: url('../img/circle-x.svg');
        mask-image: url('../img/circle-x.svg');
        -webkit-mask-size: cover;
        mask-size: cover;
    }
}

::-ms-reveal {
    display: none;
}

input[type="checkbox"] {
    position: absolute;
    opacity: 0;

    & + span, & + label {
        position: relative;
        cursor: pointer;
        padding: 0;
    }

    & + span:before, & + label:before {
        content: '';
        margin-right: 10px;
        display: inline-block;
        width: 30px;
        height: 30px;
        background: white;
        vertical-align: middle;
        margin-bottom: 3px;
    }
    
    &:focus + span:before, &:focus + label:before {
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
    }

    &:checked + span:before, &:checked + label:before {
        background: var(--eta-yellow);
        vertical-align: middle;
    }

    &:disabled + span, &:disabled + label {
        color: #b8b8b8;
        cursor: auto;
    }

    &:disabled + span:before, &:disabled + label:before {
        box-shadow: none;
        background: #ddd;
    }

    &:checked + span:after, &:checked + label:after {
        content: '';
        position: absolute;
        left: 8px;
        top: 14px;
        background: white;
        width: 2px;
        height: 2px;
        box-shadow: 2px 0 0 white,
        4px 0 0 white,
        4px -2px 0 white,
        4px -4px 0 white,
        4px -6px 0 white,
        4px -8px 0 white;
        transform: rotate(45deg) scale(1.5);
        vertical-align: middle;
    }
    + span, + label {
        font-size: 14px;
    }
}

.pf-v5-c-form__actions {
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: column;
    
    margin-block-start: 0;
    margin-block-end: 0;
    margin-inline-start: 0;
    margin-inline-end: 0;
}

#input-error {
    color: var(--eta-red);
}

.error-container {
    min-height: 18px;
    line-height: 18px;
}

.config-totp-content {
    text-align: center;
    padding-left: 0 !important;
}
#kc-totp-settings-form {
    margin-top: 2rem;
}
.login-config-totp-scan-container {
    margin-top: 2rem;
    margin-bottom: 3rem;
    a {
        font-size: 0.875rem;
    }
}