:where(:root) {
    --primary: #1b75bc;
    --secondary: rgb(60, 66, 87);
    --shadow: rgba(0, 0, 0, 0.15);

    --pf-v5-global--spacer--lg: 0;
    --pf-v5-global--spacer--2xl: 2rem;
    --pf-v5-global--FontFamily--heading: sans-serif;
    --pf-v5-global--FontFamily--text: sans-serif;

    --pf-v5-c-form__label--FontSize: 0.875rem;
    --pf-v5-c-form-control--FontSize: 0.875rem;
    --pf-v5-c-helper-text__item-text--Color: rgba(231, 0, 11, .85);
}

.pf-v5-c-brand {
    display: none;
}

.pf-v5-c-login__header {
    width: 75%;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    max-width: 100%;
    background-position: center center;
    margin-bottom: 1rem;
    margin-top: -80px;
    margin-left: -10px;
}

#kc-page-title, .login-title, h1, h2 {
    color: #111;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: .5rem;
    width: 100%;
}

@media screen and (max-width: 540px) {
    .pf-v5-c-login__header {
        height: 120px;
        margin-top: -160px;
        margin-bottom: 2rem;
        margin-left: 0;
    }

    #kc-page-title, .login-title, h1, h2 {
        font-size: 1.6rem;
        text-align: center;
    }
}

.pf-v5-c-login__container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 1rem;
    max-width: 480px;
    padding: 0;
}

.pf-v5-c-login__main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 0.75rem;
    -webkit-box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
}
.pf-v5-c-login__main>:last-child:not(.pf-v5-c-login__main-footer) {
    padding-block-end: 1rem;
}

.pf-v5-c-login__main-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

@media screen and (max-width: 540px) {
    .pf-v5-c-login__main-header {
        justify-content: center;
    }
}

.pf-v5-c-login__main-header-utilities {
    order: -1;
    margin-bottom: 1rem;
}
.pf-v5-c-form-control__utilities {
    padding-top: 0.25rem;
    padding-right: 0;
}
#login-select-toggle {
    padding-left: 0.66rem;
}

#kc-form-wrapper {
    margin: auto;
}

.kc-label, label, .pf-v5-c-form__label span, .pf-v5-c-check__label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.pf-v5-c-check__input {
    margin-top: -2px;
}
.pf-v5-c-check__label {
    margin-bottom: 0;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}
input[aria-invalid="true"] {
    border-color: rgba(231, 0, 11, .85) !important;
}
.pf-m-error,
#input-error,
#input-error-otp-code {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.pf-m-error .pf-m-status {
    display: none;
}

#kc-login,
.pf-m-primary {
    width: 100%;
    background-color: var(--primary);
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 0.375rem;
    padding: 0.75rem;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

#kc-login:hover,
.pf-m-primary:hover {
    background-color: var(--primary);
}

.pf-v5-c-form__group:not(:last-child) {
    margin-bottom: 1rem;
}

#kc-passwd-update-form .pf-v5-c-form__group {
    margin-bottom: 0;
}

.pf-v5-c-input-group {
    position: relative;
}

button[data-password-toggle] {
    position: relative;
    right: 0;
    background: none;
    border: none;
    padding: 0.5rem;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    margin-left: .5rem;
    margin-bottom: 1.25rem;
    border: 0;
}

.pf-v5-c-button.pf-m-control {
    background: none;
    position: absolute;
    right: 2px;
    top: 8px;
}

#reset-login.pf-m-control {
    background: transparent;
    position: absolute;
    right: 0;
    top: unset;
}

.pf-v5-c-button.pf-m-control:after,
.pf-v5-c-input-group__item .pf-v5-c-form-control:before,
.pf-v5-c-input-group__item .pf-v5-c-form-control:after,
.pf-v5-c-form__group .pf-v5-c-form-control:before,
.pf-v5-c-form__group .pf-v5-c-form-control:after {
    border: none !important;
}

.fas.fa-exclamation-circle {
    position: absolute;
    right: -25px;
    top: 16px;
}

button[data-password-toggle] i {
    color: rgba(54, 117, 227, 0.25);
    font-size: 1.25rem;
}

textarea, input {
    transition: border-color 0.1s ease;
}
textarea:focus, input:focus {
    outline: none;
    border: 1px solid var(--primary);
}

.pf-v5-c-form-control select {
    outline: none !important;
}

.external-help-link {
    color: var(--secondary);
    font-weight: 500;
    font-size: var(--pf-v5-c-form__label--FontSize);
}

.external-help-link a {
    transition: 0.1s ease;
    color: var(--primary);
}

.cw-footer {
    font: 400 14px / 20px Roboto, Helvetica Neue, sans-serif;
    color: #FFFFFF;
    position: absolute;
    bottom: 16px;
    width: 100%;
    text-align: center;
    opacity: .65;
}

/* MFA */
#kc-totp-settings {
    margin-left: 1rem;
}
#kc-totp-settings p {
    margin-left: .25rem;
}
#kc-totp-settings > li {
    margin-bottom: 1rem;
}
.pf-v5-c-list ul {
    list-style: disc;
    margin-left: 1.5rem;
}
#kc-totp-settings-form {
    row-gap: 8px;
}
#kc-totp-secret-key {
    font-size: var(--pf-v5-c-form__label--FontSize);
    line-height: var(--pf-v5-c-form__label--LineHeight);
    font-weight: 600;
}
#kc-totp-secret-qr-code {
    margin-left: -.875rem;
}
.pf-v5-c-form__group.pf-m-action {
    margin-block-start: .25rem;
}

.pf-v5-c-form-control.pf-m-readonly {
    background: none;
}
.pf-v5-c-form-control.pf-m-readonly input {
    border: 1px solid transparent;
}

p.instruction {
    margin-bottom: 1rem;
}
