@font-face {
    font-family: "Sparkasse Web";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/Sparkasse_web_Rg.woff") format("woff"),
    url("../fonts/Sparkasse_web_Rg.ttf") format("truetype");
}

@font-face {
    font-family: "Sparkasse Web Bold";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/Sparkasse_web_Bd.woff") format("woff"),
    url("../fonts/Sparkasse_web_Bd.ttf") format("truetype");
}

html {
    font-size: 10px;
}

body {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
    font-family: "Sparkasse Web", sans-serif;
    margin: 0;
    box-sizing: border-box;
    line-height: 20px;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: calc(env(safe-area-inset-top) + 60px);

    @media (min-width: 1200px) {
        padding-top: calc(env(safe-area-inset-top) + 80px);
    }
}

.container {
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
    width: 100%;

    @media (min-width: 768px) {
        width: 768px;
    }

    @media (min-width: 992px) {
        width: 800px;

        &.container-md-600 {
            width: 600px;
        }
    }

    @media (min-width: 1200px) {
        width: 1170px;

        &.container-md-1024 {
            width: 1024px;
        }
    }
}

.login-border {
    padding-top: 14px;

    @media (min-width: 768px) {
        border: 2px solid #f0f0f0;
        border-radius: 15px;
        padding: 30px;
    }
}

.logo-container {
    display: flex;
    justify-content: center;

    img {
        width: 130px;
        padding-bottom: 25px;

        @media (min-width: 768px) {
            padding-top: 25px;
        }
    }
}

form {
    padding-top: 4px;

    .form-group {
        position: relative;
        margin: 20px 0 28px;

        &:before, &:after {
            display: table;
            content: ' ';
        }

        input {
            border: none;
            font-size: 16px;
            padding: 2.4rem 1rem .5rem;
            width: 100%;
            box-sizing: border-box;
            transition: border-color 0.3s;
            background-color: #f5f5f5;
            line-height: inherit;
            font-family: "Sparkasse Web", sans-serif;

            &:focus {
                outline: none;
            }
        }

        label {
            color: #666;
            font-weight: 400;
            font-size: 16px;
            position: absolute;
            pointer-events: none;
            left: 0;
            top: 15px;
            margin-left: 10px;
            transition: 0.3s ease all;
        }

        input:focus ~ label, input:not(:placeholder-shown) ~ label {
            top: 0;
            margin-left: 4px;
            padding: 2px;
            font-size: 13px;
        }

        .line {
            position: absolute;
            top: 47px;
            width: 0;
            height: 2px;
            background: red;
            transition: width 0.3s;
        }

        input:focus ~ .line {
            width: 100%;
        }

        .error-msg {
            font-size: 12px;
            color: #c50111;
        }

        .toggle-password {
            position: absolute;
            right: 10px;
            top: 24px;
            transform: translateY(-50%);
            cursor: pointer;
            width: 24px;
            height: 24px;
        }
    }

    button[type="submit"] {
        width: 100%;
        color: #fff;
        background-color: red;
        border: 2px solid #ff0000;
        border-radius: 4px;
        height: 36px;
        padding: 6px 27px;
        font-family: Sparkasse Web Bold, sans-serif;
        font-size: 15px;
        line-height: 1.3;
        cursor: pointer;

        &:hover {
            background-color: #fff;
            color: #ff0000;
        }

        &:focus {
            background-color: #ff0000;
            color: #fff;
        }

        &:active {
            box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
        }
    }
}

.forgot-password {
    a {
        display: flex;
        justify-content: center;
        align-items: center;
        color: #ff0000;
        background-color: transparent;
        border: 2px solid #ff0000;
        border-radius: 4px;
        box-sizing: border-box;
        height: 36px;
        font-family: Sparkasse Web Bold, sans-serif;
        font-size: 15px;
        text-decoration: none;

        &:hover, &:focus {
            color: #e10219
        }
    }
}

.register-container {
    p {
        font-family: Sparkasse Web Bold, sans-serif;
        margin-bottom: 15px;
    }

    a {
        display: flex;
        justify-content: center;
        align-items: center;
        color: black;
        background-color: transparent;
        border: 2px solid black;
        box-sizing: border-box;
        border-radius: 4px;
        height: 36px;
        font-family: Sparkasse Web Bold, sans-serif;
        font-size: 15px;
        text-decoration: none;

        &:hover {
            border-color: #ff0000;
            color: #ff0000;
        }

        &:focus {
            border-color: #ff0000;
            background-color: #ff0000;
            color: #fff;
        }

        &:active {
            box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
        }
    }
}

footer {
    height: 110px;
    margin-top: 50px;
    text-align: center;
    color: #777;

    .footer-copyright {
        float: left;
        @media (max-width: 768px) {
            float: none;
        }
    }

    .footer-additional {
        display: inline-flex;
        float: right;
        @media (max-width: 768px) {
            float: none;
        }

        a {
            color: #777;
            text-decoration: none;

            &:hover, &:focus {
                color: #000
            }
        }

        span {
            width: 40px;
        }
    }
}
