/* Patternfly CSS places a "bg-login.jpg" as the background on this ".login-pf" class.
   This clashes with the "keycloak-bg.png' background defined on the body below.
   Therefore the Patternfly background must be set to none. */

:root {
    --brand-color: #FFCB22;
    --color-orange: #F97316;
}

body {
    font-size: 14px;
    color: #fff;
}

a {
    color: var(--brand-color);
}

a:hover,
a:focus {
    color: var(--brand-color);
    text-decoration: underline;
    outline: none;
}

.pf-c-form-control:focus,
input.pf-c-form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
.pf-c-form-control[aria-invalid=true] {
    outline: none !important;
    box-shadow: none !important;
    border-bottom-width: 1px;
    padding-bottom: 5px;
}

input[type='checkbox'] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #292D36;
    border: 1px solid #404650;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    /*transition: all 0.15s ease-in-out;*/
    margin: 0 !important;
    vertical-align: bottom;
}

input[type='checkbox']:focus {
    outline-offset: 0;
    outline: none !important;
    box-shadow: none !important;
}

input[type='checkbox']:checked {
    border-color: var(--brand-color);
    background: var(--brand-color);
}

input[type='checkbox']::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 11px;
    border: solid #1e2229;
    border-width: 0 2.5px 2.5px 0;
    left: 7px;
    top: 3px;
    transform: rotate(45deg) scale(0);
    transition: transform 0.1s ease-in-out;
}

input[type='checkbox']:checked::after {
    transform: rotate(45deg) scale(1);
}

.login-pf {
    background: none;
}

.login-pf body {
    background: #000;
    height: 100%;
}

.login-pf-page {
    padding-top: 84px;
    padding-bottom: 94px;
}

.login-pf-page .login-pf-page-header {
    margin-bottom: 11px;
}

.login-pf-page-header #kc-header-wrapper {
    max-width: 668px;
    height: 136px;
    margin: auto;
    background: transparent url("../img/kx-logo.png") no-repeat 0 0 / contain;
    font-size: 0;
    padding: 0;
}

.login-pf-page .card-pf p {
    color: #fff;
}

.password-policy-info {
    display: none;
    color: #fff;
    margin-bottom: 24px;
}

.password-policy-info ul li {
    transition: all 0.2s ease-in-out;
    position: relative;
    padding-left: 17px;
}

.password-policy-info ul li::before {
    content: '✓ ';
    position: absolute;
    left: 0;
    font-size: 17px;
    top: -4px;
}

.password-policy-info ul li.valid::before {
    color: var(--brand-color);
}

.password-policy-info ul li.valid {
    color: var(--brand-color);
    text-decoration: line-through;
}

textarea.pf-c-form-control {
    height: auto;
}

.pf-c-alert__title {
    font-size: var(--pf-global--FontSize--xs);
}

p.instruction {
    margin: 5px 0;
    padding: 48px 65px 0;
    font-size: 14px;
    line-height: 20px;
}

.pf-c-button.pf-m-control {
    border-color: rgba(230, 230, 230, 0.5);
}

.login-pf-page .login-pf-header {
    margin-bottom: 36px;
}

h1#kc-page-title {
    color: #fff;
    text-align: left;
    font-weight: 600;
    margin: 0;
}

body.login-verify-email h1#kc-page-title {
    text-align: center;
    margin-top: 47px;
}

body.info h1#kc-page-title,
body.login-page-expired h1#kc-page-title,
body.error h1#kc-page-title {

    text-align: center;
    margin: 17px 0 0;
}

#kc-locale ul {
    background-color: var(--pf-global--BackgroundColor--100);
    display: none;
    top: 20px;
    min-width: 100px;
    padding: 0;
}

#kc-locale-dropdown {
    display: inline-block;
}

#kc-locale-dropdown:hover ul {
    display: block;
}

#kc-locale-dropdown a {
    color: var(--pf-global--Color--200);
    text-align: right;
    font-size: var(--pf-global--FontSize--sm);
}

a#kc-current-locale-link::after {
    content: "\2c5";
    margin-left: var(--pf-global--spacer--xs)
}

.pf-c-alert {
    border-radius: 6px;
    border-width: 0 0 0 6px;
    border-color: var(--color-orange);
    border-style: solid;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 35px 28px 35px 28px;
    margin-bottom: 24px;
}

.pf-c-alert__icon {
    margin: 0;
}

.pf-c-alert__icon .fa-exclamation-triangle:before {
    width: 28px;
    height: 25px;
    content: "";
    display: block;
    background: url("../img/feedback-warning-sign.png") no-repeat 0 0;
}

.pf-c-alert__title {
    font-size: 14px;
    color: var(--color-orange);
    line-height: 18px;
}

.login-pf .container {
    padding-top: 40px;
}

#kc-logo {
    width: 100%;
}

div.kc-logo-text span {
    display: none;
}

#kc-header {
    color: #ededed;
    overflow: visible;
    white-space: nowrap;
}

#kc-header-wrapper {
    font-size: 29px;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.2em;
    padding: 62px 10px 20px;
    white-space: normal;
}

#kc-content {
    width: 100%;
}

#kc-attempted-username {
    font-size: 20px;
    font-family: inherit;
    font-weight: normal;
    padding-right: 10px;
}

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

#kc-webauthn-settings-form {
    padding-top: 8px;
}

#kc-form-webauthn .select-auth-box-parent {
    pointer-events: none;
}

#kc-form-webauthn .select-auth-box-desc {
    color: var(--pf-global--palette--black-600);
}

#kc-form-webauthn .select-auth-box-headline {
    color: var(--pf-global--Color--300);
}

#kc-form-webauthn .select-auth-box-icon {
    flex: 0 0 3em;
}

#kc-form-webauthn .select-auth-box-icon-properties {
    margin-top: 10px;
    font-size: 1.8em;
}

#kc-form-webauthn .select-auth-box-icon-properties.unknown-transport-class {
    margin-top: 3px;
}

#kc-form-webauthn .pf-l-stack__item {
    margin: -1px 0;
}

#kc-form-wrapper {
    margin-top: 10px;
}

#kc-form-options span {
    display: block;
}

#kc-form-options .checkbox {
    margin-top: 0;
    color: #72767b;
}

#kc-form-options .checkbox label {
    padding-left: 0;
}

#kc-form-options .checkbox label input[type="checkbox"] {
    position: relative;
}

#kc-terms-text {
    margin-bottom: 20px;
}

#kc-registration {
    margin-bottom: 0;
}

/* TOTP */

.subtitle {
    text-align: right;
    margin-top: 30px;
    color: #909090;
}

.required {
    color: #EC8C9E;
    font-size: 10px;
    padding-left: 12px;
}

ol#kc-totp-settings {
    margin: 0;
    padding-left: 20px;
}

ul#kc-totp-supported-apps {
    margin-bottom: 10px;
}

#kc-totp-secret-qr-code {
    max-width: 150px;
    max-height: 150px;
}

#kc-totp-secret-key {
    background-color: #fff;
    color: #333333;
    font-size: 16px;
    padding: 10px 0;
}

/* OAuth */

#kc-oauth h3 {
    margin-top: 0;
}

#kc-oauth ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#kc-oauth ul li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    padding: 10px 0;
}

#kc-oauth ul li:first-of-type {
    border-top: 0;
}

#kc-oauth .kc-role {
    display: inline-block;
    width: 50%;
}

/* Code */
#kc-code textarea {
    width: 100%;
    height: 8em;
}

/* Social */
.kc-social-links {
    margin-top: 20px;
}

.kc-social-links li {
    width: 100%;
}

.kc-social-provider-logo {
    font-size: 23px;
    width: 30px;
    height: 25px;
    float: left;
}

.kc-social-gray {
    color: var(--pf-global--Color--200);
}

.kc-social-item {
    margin-bottom: var(--pf-global--spacer--sm);
    font-size: 15px;
    text-align: center;
}

.kc-social-provider-name {
    position: relative;
}

.kc-social-icon-text {
    left: -15px;
}

.kc-social-grid {
    display: grid;
    grid-column-gap: 10px;
    grid-row-gap: 5px;
    grid-column-end: span 6;
    --pf-l-grid__item--GridColumnEnd: span 6;
}

.kc-social-grid .kc-social-icon-text {
    left: -10px;
}

.kc-login-tooltip {
    position: relative;
    display: inline-block;
}

.kc-social-section {
    text-align: center;
}

.kc-social-section hr {
    margin-bottom: 10px;
    display: none;
}

.kc-social-section h2 {
    color: #fff;
}

.kc-login-tooltip .kc-tooltip-text {
    top: -3px;
    left: 160%;
    background-color: black;
    visibility: hidden;
    color: #fff;

    min-width: 130px;
    text-align: center;
    border-radius: 2px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
    padding: 5px;

    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
    visibility: visible;
    opacity: 0.7;
}

/* Arrow for tooltip */
.kc-login-tooltip .kc-tooltip-text::after {
    content: " ";
    position: absolute;
    top: 15px;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent black transparent transparent;
}

@media (min-width: 768px) {
    #kc-container-wrapper {
        position: absolute;
        width: 100%;
    }

    .login-pf .container {
        padding-right: 80px;
    }

    #kc-locale {
        position: relative;
        text-align: right;
        z-index: 9999;
    }
}

@media (max-width: 767px) {

    #kc-header {
        padding-left: 15px;
        padding-right: 15px;
        float: none;
        text-align: left;
    }

    #kc-header-wrapper {
        font-size: 16px;
        font-weight: bold;
        padding: 20px 60px 0 0;
        color: #72767b;
        letter-spacing: 0;
    }

    div.kc-logo-text {
        margin: 0;
        width: 150px;
        height: 32px;
        background-size: 100%;
    }

    #kc-form {
        float: none;
    }

    #kc-info-wrapper {
        /*border-top: 1px solid rgba(255, 255, 255, 0.1);
        background-color: transparent;*/
    }

    .login-pf .container {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    #kc-locale {
        position: absolute;
        width: 200px;
        top: 20px;
        right: 20px;
        text-align: right;
        z-index: 9999;
    }
}

@media (min-height: 646px) {
    #kc-container-wrapper {
        bottom: 12%;
    }
}

@media (max-height: 645px) {
    #kc-container-wrapper {
        padding-top: 50px;
        top: 20%;
    }
}

.card-pf form.form-actions .btn {
    float: right;
    margin-left: 10px;
}

#kc-form-login {
    margin-bottom: 92px;
}

#kc-form-buttons {
    margin-top: 16px;
}

.login-pf-page .login-pf-brand {
    margin-top: 20px;
    max-width: 360px;
    width: 40%;
}

.select-auth-box-arrow {
    display: flex;
    align-items: center;
    margin-right: 2rem;
}

.select-auth-box-icon {
    display: flex;
    flex: 0 0 2em;
    justify-content: center;
    margin-right: 1rem;
    margin-left: 3rem;
}

.select-auth-box-parent {
    border-top: 1px solid var(--pf-global--palette--black-200);
    padding-top: 1rem;
    padding-bottom: 1rem;
    cursor: pointer;
}

.select-auth-box-parent:hover {
    background-color: #f7f8f8;
}

.select-auth-container {
    padding-bottom: 0px !important;
}

.select-auth-box-headline {
    font-size: var(--pf-global--FontSize--md);
    color: var(--pf-global--primary-color--100);
    font-weight: bold;
}

.select-auth-box-desc {
    font-size: var(--pf-global--FontSize--sm);
}

.select-auth-box-paragraph {
    text-align: center;
    font-size: var(--pf-global--FontSize--md);
    margin-bottom: 5px;
}

.login-pf-page .card-pf {
    background: #22252C;
    border-radius: 8px;
    max-width: 576px;
    margin: auto;
    padding: 63px 48px;
}

.pf-c-button.pf-m-primary {
    background-color: #b51f23;
}

.login .form-group {
    margin-bottom: 24px;
}

.register .form-group {
    margin-bottom: 16px;
}

.pf-c-form__label-text {
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    font-weight: normal;
}

.pf-c-input-group {
    background: transparent;
}

.pf-c-form-control:not(textarea) {
    background: #292D36;
    border: 1px solid #404650;
    border-radius: 4px;
    height: 42px;
    font-size: 15px;
    color: #fff;
}

.pf-c-form-control[aria-invalid=true] {
    border-color: #EC8C9E;
    background-image: none;
}

.pf-c-form-control:not(textarea):focus {
    border: 1px solid var(--brand-color);
}

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

.pf-c-button:after {
    border: none;
}

.pf-c-input-group .pf-c-button.pf-m-control {
    background: none;
    border: none;
    position: absolute;
    right: 0;
    height: 100%;
    z-index: 1000;
}

.pf-c-button.pf-m-control i {
    color: #fff;
    font-size: 20px;
}

input.pf-c-form-control:-webkit-autofill,
input.pf-c-form-control:-webkit-autofill:hover,
input.pf-c-form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

#kc-form-buttons.form-group {
    text-align: center;
}

.pf-c-button.pf-m-primary {
    height: 40px;
    border-radius: 40px;
    background-color: var(--brand-color);
    display: inline-block;
    width: auto;
    margin: auto;
    padding: 0 16px;
    font-size: 14px;
    color: #1A1D22;
    font-weight: 400;
    cursor: pointer;
}

.pf-c-button.pf-m-primary.btn-md {
    height: 34px;
    border-radius: 40px;
}

.login-pf-page .login-pf-signup {
    margin: 60px -30.5px 0;
    padding: 16px 0 0;
    border-top: 1px solid #fff;
    font-size: unset;
}

.login-pf-page .login-pf-signup p.instruction {
    padding: 0;
    margin: 0;
}

.login-pf-page .login-pf-signup span {
    font-size: 14px;
    color: #fff;
}

.login-pf-page .login-pf-signup a {
    margin-left: 0;
}

body.info p.instruction,
body.login-page-expired p.instruction,
body.error p.instruction {
    text-align: center;
    padding: 0;
    margin-bottom: 125px;
}

body.error p.instruction+p {
    text-align: center;
}

body.info p.instruction+p {
    display: none;
}

/*phone*/
@media (max-width: 767px) {

    .login-pf-page {
        padding: 0;
    }

    .login-pf-page .login-pf-page-header {
        margin: 0;
    }

    .login-pf-page-header #kc-header-wrapper {
        height: 70px;
        background-position: 50% 50%;
    }

    .login-pf-page .card-pf {
        max-width: none;
        border-radius: 0;
    }

    .kc-social-grid {
        grid-column-end: 12;
        --pf-l-grid__item--GridColumnEnd: span 12;
    }

    .kc-social-grid .kc-social-icon-text {
        left: -15px;
    }

    p.instruction {
        padding: 24px 12px;
    }
}

.login-pf-page .login-pf-signup {}

#kc-content-wrapper .row {
    margin-left: 0;
    margin-right: 0;
}

.login-pf-page.login-pf-page-accounts {
    margin-left: auto;
    margin-right: auto;
}

.login-pf-page .btn-primary {
    margin-top: 0;
}

.login-pf-page .list-view-pf .list-group-item {
    border-bottom: 1px solid #ededed;
}

.login-pf-page .list-view-pf-description {
    width: 100%;
}

#kc-form-login div.form-group:last-of-type,
#kc-register-form div.form-group:last-of-type,
#kc-update-profile-form div.form-group:last-of-type,
#kc-update-email-form div.form-group:last-of-type {
    margin-bottom: 0px;
}

.no-bottom-margin {
    margin-bottom: 0;
}

#kc-back {
    margin-top: 5px;
}

/* Recovery codes */
.kc-recovery-codes-warning {
    margin-bottom: 32px;
}

.kc-recovery-codes-warning .pf-c-alert__description p {
    font-size: 0.875rem;
}

.kc-recovery-codes-list {
    list-style: none;
    columns: 2;
    margin: 16px 0;
    padding: 16px 16px 8px 16px;
    border: 1px solid #D2D2D2;
}

.kc-recovery-codes-list li {
    margin-bottom: 8px;
    font-size: 11px;
}

.kc-recovery-codes-list li span {
    color: #6A6E73;
    width: 16px;
    text-align: right;
    display: inline-block;
    margin-right: 1px;
}

.kc-recovery-codes-actions {
    margin-bottom: 24px;
}

.kc-recovery-codes-actions button {
    padding-left: 0;
}

.kc-recovery-codes-actions button i {
    margin-right: 8px;
}

.kc-recovery-codes-confirmation {
    align-items: baseline;
    margin-bottom: 16px;
}

.one-row {
    display: flex;
    gap: 16px;
}

.backToLogin a {
    font-size: 12px;
    padding-left: 18px;
    background: transparent url("../img/icon-arrow-left-yellow.png") no-repeat 0 50%;
    font-weight: 600;
}

.pf-c-button.pf-m-primary.kcButtonWithArrow {
    background-image: url("../img/icon-arrow-right-black.png");
    background-repeat: no-repeat;
    background-position: calc(100% - 18px) 50%;
    padding-right: 35px;
}

#kc-registration-terms-text {
    background: #292D36;
    border: 1px solid #404650;
    border-radius: 4px;
    padding: 12px 8px 12px 16px;
}

#kc-registration-terms-text .wrapper {
    overflow-y: auto;
    height: 116px;
    font-size: 14px;
    color: #fff;
    line-height: 20px;
    font-weight: 400;
}

#kc-registration-terms-text .wrapper h1 {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 12px;
}

#kc-registration-terms-text .wrapper b {
    font-weight: 400;
}

#kc-registration-terms-text .wrapper a {
    text-decoration: underline;
}

#kc-registration-terms-text .wrapper::-webkit-scrollbar {
    width: 6px;
}

#kc-registration-terms-text .wrapper::-webkit-scrollbar-thumb {
    background: #A5ABB8;
    border-radius: 8px;
    width: 8px;
}

/* End Recovery codes */