/** Fonts **/
/*@import url('./custom-font.css');*/

/* Overrides */
@import url('./overrides.css');
/* Defaults */

body {
    margin: 0;
}

@property --color-dark-blue {
    syntax: "<color>";
    inherits: false;
    initial-value: #1e2e3f;
;
}

/* 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. */
.login-pf {
    background: none;
}

body {
    display: flex;

    background-color: white !important;
    background-image: none !important;
}

.hide {
    display: none;
}

.left-side-container, .right-side-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50vw;
    height: 100vh;
}

.left-side-container {
    background-color: var(--color-dark-blue);
    overflow-x: auto;
}

.login-form-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;

    p:first-child {
        font-weight: bold;
        margin-bottom: -10px;
    }

    p:nth-child(2) {
        font-weight: lighter;
    }

    p {
        font-size: 1.3rem;
        margin: 0;
    }
}

.jira-img {
    width: 60px;
    object-fit: contain;

    img {
        width: 100%;
        height: auto;
    }
}

.form-header-text {
    margin-left: 18px;
}


.login-form-container {
    display: flex;
    flex-direction: column;
    padding: 48px 32px;

    width: 60%;
    background-color: white;

    input[type="submit"] {
        width: 100%;
        line-height: inherit;
        padding: 14px;

        background-color: var(--color-dark-blue);
        color: white;
        font-weight: bold;

        border: none;
        border-radius: 5px;
        cursor: pointer;
    }

    input[type="submit"]:focus {
        filter: brightness(80%);
    }

    form {
        display: flex;
        gap: 24px;
    }
}

.login-form-container form {
    position: relative;
    display: flex;
    flex-direction: column;

    * {
        font-size: 14px;
    }
}

.input-field {
    height: 50px;
    border-radius: 5px;
    border: 1.5px solid grey;

    &.invalid {
        border: 2px solid red;
        outline: none;
    }
}

.invalid-input-msg {
    padding-top:6px;
    color: red;
    text-align: end;
    margin: 0;
}

.input-container {
    width: 100%;

    * {
        width: 100%;
    }

    label {
        font-weight: bold;
    }

    input {
        padding: 0 18px;
        font-size: 1rem;
    }
}

.inner-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 6px;

    .input-ornament-right {
        position: absolute;
        display: flex;
        width: fit-content;
        right: 0;
        padding-right: 24px;

        svg {
            cursor: pointer;
            transition: opacity .2s ease-in-out;
        }

        #hide-password:hover, #show-password:hover {
            opacity: 1;
        }
    }

    input {
        padding-right: 60px !important;
    }
}

.recover-password-link {
    display: inline-block;
    float: right;

    a {
        float: right;
        width: fit-content;
        margin-top: 12px;
        color: var(--color-dark-blue);
        font-weight: bold;
        text-decoration: underline;

    }
}

.horizontal-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    p {
        align-self: flex-end;
        font-size: 14px;
    }

    hr {
        border-bottom: 1px solid black;
        width: 4px;
        margin-right: 6px;
        margin-left: 6px;
    }
}

.pseudo-button {
    display: block;
    padding: 14px;

    text-align: center;
    border-radius: 5px;
    font-size: 14px;
    text-decoration: none;

    &:hover {
        text-decoration: underline;
    }

    &.blue-outline {
        border: 2px solid var(--color-dark-blue);
        font-weight: bold;
        color: var(--color-dark-blue);
    }
}

.right-side-container {
    flex-direction: column;
    padding: 0 74px;

    .header-text {
        width: 100%;
    }

    h1 {
        margin-top: 42px;
        margin-bottom: 10px !important;
        font-size: 40px;
        line-height: 44px;
        font-weight: bold;
    }

    p {
        font-size: 22px;
        line-height: 28px;
        margin-top: 0;
        margin-bottom: 10px;
    }

    .person-img {
        width: 80%;
        object-fit: contain;

        img {
            width: 100%;
            height: auto;
            transform: rotateY(180deg);
        }
    }
}

.totp-config-instructions {
    * {
        font-size: 16px;
    }

    a {
        color: #0088ce;
        text-decoration: none;
    }
}

.vertical-line {
    width: 60%;
    margin-bottom: 32px;
    border: 0 solid black;
    border-top: 1px solid rgb(241, 241, 241);
}

#kc-totp-secret-qr-code {
    margin: 0 auto;
}

.logout-checkbox label {
    font-weight: bold;
    padding-left: 6px;
}

@media screen and (max-width: 1070px) {
    .right-side-container {
        display: none;
    }

    .left-side-container {
        width: 100vw;
    }
}

@media screen and (max-width: 540px) {
    .login-form-container {
        width: 80%;
    }
}

@media screen and (max-width: 410px) {
    .login-form-header {
        flex-direction: column;
    }

    .form-header-text {
        margin-left: 0;
    }
}

@media screen and (max-height: 620px) {
    .left-side-container {
        position: relative;
        display: block;
        height: unset;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .login-form-container {
        margin: 0 auto;
    }
}

@media screen and (max-height: 1200px) {
    .totp-config {
        position: relative;
        display: block;
        box-sizing: border-box;
        padding-top: 24px;
        padding-bottom: 24px;

        .login-form-container {
            margin: 0 auto;
        }
    }
}

@media screen and (max-width: 276px) {
    .form-header-text p {
        font-size: 0.8rem !important;
    }
}
