:root {
    --pf-global--primary-color--100: #0C3A6E;
    --pf-global--primary-color--200: #246cb0;
    --pf-global--danger-color--200: #FF3C2D;
    --pf-global--success-color--200: #32c85a;

    --pf-global--disabled-color--100: #B4B6BA;
    --pf-global--disabled-color--200: #E2E4E7;

    --color-darker-gray: #323438;
    --color-dark-gray: #7d7f83;
    --color-light-gray: #D2D4D8;

    --success-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg data-name='Komponente 125'%3E%3Cg data-name='Ellipse 110' fill='%23fff' stroke='%2332c85a'%3E%3Ccircle cx='12' cy='12' r='12' stroke='none'/%3E%3Ccircle cx='12' cy='12' r='11.5' fill='none'/%3E%3C/g%3E%3Cpath d='m11.1 15.526 6.566-6.566L16.4 7.694 9.787 14.26l-2.58-2.58-1.266 1.267 3.846 3.847 1.313-1.268Z' fill='%2332c85a'/%3E%3C/g%3E%3C/svg%3E");
    --error-icon: url("data:image/svg+xml,%3Csvg data-name='Komponente 51 – 1' xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Ccircle data-name='Ellipse 57' cx='8' cy='8' r='8' fill='%23ff3c2d'/%3E%3Cg data-name='error-icon' fill='%23fff'%3E%3Cpath data-name='Pfad 2375' d='M8.013 2.523a1.141 1.141 0 0 1 1.132 1.15v.018l-.193 5.6a.921.921 0 1 1-1.841 0l-.174-5.6a1.13 1.13 0 0 1 1.094-1.168h-.017Z'/%3E%3Cpath data-name='Pfad 2376' d='M8.041 13.41a1.178 1.178 0 1 1 1.178-1.178 1.178 1.178 0 0 1-1.178 1.178Z'/%3E%3C/g%3E%3C/svg%3E");
}

html * {
    font-family: "AzoSans", sans-serif;
}

body.body {
    background: #fff;
    color: var(--color-darker-gray);
}

.login-pf-page {
    padding-top: 75px;
}

a {
    color: var(--pf-global--primary-color--200);
    font-weight: 500;

    &:hover {
        color: var(--pf-global--primary-color--100) !important;
        text-decoration: none;
    }

    &:focus {
        text-decoration: none;
    }
}

.body .card {
    font-size: 15px;
    border: 0;
    box-shadow: 0px 5px 20px #0000001A;

    max-width: 600px;
    padding: 20px 50px 30px;
    margin: auto;

    h1 {
        font-size: 22px;
        font-weight: 500;
        line-height: 23px;
        text-align: center;
        margin: 0;
        margin-top: 0px;
    }

    header {

        flex-direction: row;
        justify-content: center;

        a,
        a:hover {
            color: inherit !important;
        }

        h1 {
            background-image: url(../img/logo.png);
            background-repeat: no-repeat;
            background-position: top;
            background-size: 95px 42px;
            padding-top: 54px;

            &::after {
                content: "myReinhausen";
            }
        }
    }

    #kc-locale {
        display: none;
    }

    #kc-content-wrapper {
        margin-top: 30px;

        .alert-success,
        .alert-info,
        .alert-warning,
        .alert-error,
        .alert-danger {
            background: none;
        }

        .pf-c-alert {
            padding: 0px 0px 30px;
            border: none;
        }

        .pf-c-alert__icon {

            display: block;
            width: 24px;
            height: 24px;

            background: no-repeat center;

            &:has(.success) {
                background-image: var(--success-icon);
            }

            &:has(.error) {
                background-image: var(--error-icon);
            }

        }

        .pf-c-alert__title {
            font-size: 14px;
            font-weight: 400;
        }
    }

    #kc-form-wrapper {
        margin-top: 0;
    }

    form,
    .card_content {
        background-color: #F3F4F6;
        max-width: 500px;
        padding: 40px 50px 50px;
        margin: auto;
        display: flex;
        flex-direction: column;
        gap: 0;
        position: relative;

        & .form-group:first-child {
            display: flex;
            flex-direction: column;

            .kc-feedback-text {
                order: -1;
                background-image: var(--error-icon);
                background-repeat: no-repeat;
                background-position: left center;
                padding-left: calc(16px + 10px);
                margin-bottom: 28px;
                font-size: 14px;
            }
        }

        & .instruction {
            display: flex;
            flex-direction: column;
            align-items: center;

            & br {
                margin-top: 35px;
            }
        }
    }

    p {
        color: var(--color-darker-gray);
        text-align: center;
        margin-bottom: 20px;
        line-height: 22px;

        &:first-of-type {
            margin-top: 30px;
        }

        &:last-of-type {
            margin-bottom: 30px;
        }
    }

    .login-pf-settings {
        order: 1;
        justify-content: center;
        flex-direction: column;
        margin-bottom: 0;
        position: relative;

        .option_wrapper {
            position: absolute;
            left: 0;
            right: 0;
            top: calc(15px / 2);
            text-align: center;
        }
    }

    .card_label {
        color: var(--color-dark-gray);
        line-height: 22px;
        font-size: 15px;
        margin-bottom: 5px;
    }

    .card_input {
        border: 1px solid var(--color-light-gray);
        background-color: #fff;
        transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
        font-weight: 500;
        outline: transparent;
        padding: 10px 20px;
        height: 40px;

        &:hover {
            border-color: var(--color-dark-gray);

            &~button::after {
                border-color: var(--color-dark-gray);
                /* when hovering input, change eye border */
            }
        }

        &:has(~ button) {
            border-right: none;
        }

        &:has(~ button:hover) {
            border-color: var(--color-dark-gray);
            /* when hovering the eye, change input border*/
        }
    }

    #kc-info {
        margin: 0;
        background-color: #fff;
        padding-top: 40px;

        #kc-info-wrapper {
            background: none;
            padding: 0;
            margin: 0;
            font-size: inherit;
        }

        span {
            display: flex;
            flex-direction: column;
        }
    }
}

.button {
    font-weight: 500;
    line-height: 23px;
    position: relative;
    background-color: #fff;
    box-shadow: none;
    border: 0;
    height: 40px;
    transition: all .22s ease-in-out;

    .button-primary {
        &:hover {
            color: #fff;
        }
    }

    &::after {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        pointer-events: none;
        content: "";
        border: 1px solid var(--color-light-gray);
        border-left: none;
        transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    }

    &:hover::after {
        border-color: var(--color-dark-gray);
    }
}

.icon {
    display: block;
    width: 30px;
    height: 30px;
    background-color: var(--color-dark-gray);
}

.icon-eye {
    -webkit-mask-image: url(../img/eye.svg);
    mask-image: url(../img/eye.svg);
}

.icon-eye-closed {
    -webkit-mask-position: -30px;
    mask-position: -30px;
}

[aria-invalid="true"] {
    background-image: none !important;
}

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

#kc-form-login div.form-group:last-of-type {
    margin-bottom: 20px;
}

#kc-form-options {
    text-align: center;

    a {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }
}

.text_center {
    text-align: center !important;
}

@media (max-width: 767px) {
    .body .card {
        box-shadow: none;
        padding: 0 18px;

        h1:not(header h1) {
            font-size: 18px;
        }

        form,
        .card_content {
            .login-pf-settings {
                position: relative;
                margin: 0 !important;
                left: auto;
                right: auto;
                padding: 0;
                transform: none;
                max-width: none;
                background: none;
            }
        }
    }

    #kc-form-buttons {
        padding: 0;
    }

}