@charset "utf-8";
/* PM_ver5 의 public/css/login/login.css 를 옮겼다. auth-stack 로그인에서 쓰지 않는 규칙(휴대폰 인증·도움말 창·로그인 유지)은 뺐다 */
@import url("/css/reset.css");
@import url("/css/login/system.css");

/* 배경·로고는 운영 Sentinel 로그인 서버의 bridge 테마 값이다. 엠비언트 그림은 그쪽에도 없다 */
:root {
    --login-background: url(/img/login/background-bridge.png);
    --login-logo: url(/img/login/logo-bridge.svg);
    --login-logo-width: 32.0625rem;
    --login-ambient: none;
}

body {
    margin: 0;
    min-height: 100vh;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-image: var(--login-background);

    article {
        border-radius: 1rem;
        border: 0.0625rem solid rgba(255, 255, 255, 0.10);
        background: rgba(17, 17, 17, 0.10);
        box-shadow: 0 1rem 2rem 0 rgba(0, 0, 0, 0.20);
        backdrop-filter: blur(1rem);
        display: flex;
        align-items: center;
    }

    .login {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 79.875rem;
        height: 15rem;

        >:nth-child(1) {
            padding-left: 3rem;
            flex-grow: 1;
            gap: 0.25rem;
        }

        >section {
            display: flex;
            flex-direction: column;

            /* 로고 */
            >i {
                background: var(--login-logo) no-repeat center / contain;
                width: var(--login-logo-width);
                height: 3.125rem;
            }

            >:nth-child(2), :nth-child(5) {
                color: #fff;
            }

            >:nth-child(3) {
                padding-top: 1rem;
                font-size: var(--login-font-size, 0.875rem);
                color: #ddd;
            }

            >form {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                padding: 0 2rem;
                background: rgba(17, 17, 17, 0.20);
                box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.20);
                backdrop-filter: blur(1rem);
                height: 15rem;
                border-radius: 0 1rem 1rem 0;
                gap: 0.5rem;
                width: 19.5rem;

                h5 {
                    color: var(--color-dahong);
                    text-align: left;
                    width: 100%;
                }

                div {
                    display: flex;
                    align-items: center;

                    >input[type="text"],
                    input[type="password"] {
                        border-radius: 1.5rem;
                        border: 0.0625rem solid rgba(255, 255, 255, 0.10);
                        background: rgba(255, 255, 255, 0.10);
                        font-size: var(--login-font-size, 0.875rem);
                        font-weight: 400;
                        line-height: 1.25rem;
                        letter-spacing: 0.0625rem;
                        padding: 0.375rem 1rem;
                        width: 80%;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;

                        &:focus {
                            outline: 0.0625rem solid rgba(255, 255, 255, 0.60);
                            background: rgba(255, 255, 255, 0.20);
                        }

                        &::placeholder {
                            color: rgba(255, 255, 255, 0.20);
                            font-size: var(--login-font-size, 0.875rem);
                            font-weight: 400;
                            line-height: 1.25rem;
                            letter-spacing: -0.0175rem;
                        }

                        &:hover {
                            background: rgba(255, 255, 255, 0.20);
                        }
                    }

                    label {
                        font-size: var(--login-font-size, 0.875rem);
                        font-weight: 400;
                        line-height: 1.25rem;
                        letter-spacing: -0.0175rem;
                        width: 3rem;
                        color: #fff;
                    }
                }

                button {
                    border-radius: 1.5rem;
                    border: 0.0625rem solid rgba(255, 255, 255, 0.10);
                    background: rgba(17, 17, 17, 0.20);
                    box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.20);
                    backdrop-filter: blur(1rem);
                    font-size: var(--login-font-size, 0.875rem);
                    font-weight: 400;
                    line-height: 1.25rem;
                    letter-spacing: -0.0175rem;
                    color: #fff;
                    padding: 0.5rem 1rem;
                    width: 100%;
                    cursor: pointer;
                    transition: all 0.125s;
                    margin-top: 0.25rem;

                    &:hover {
                        background: rgba(17, 17, 17, 0.40);
                        scale: 1.025;
                    }

                    &:active {
                        background: rgba(255, 255, 255, 0.20);
                        scale: 1;
                    }
                }

                >:nth-last-child(1) {
                    color: #aaa;
                    text-decoration-line: underline;
                    cursor: pointer;

                    &:hover {
                        color: #fff;
                    }
                }
            }
        }

        /* 엠비언트 그림 자리. bridge 는 그림이 없어 빈 칸으로 간격만 잡는다 */
        >i {
            width: 22.625rem;
            height: 14rem;
            background: var(--login-ambient) no-repeat center / contain;
        }
    }
}

@media screen and (max-width: 960px) {
    body {
        .login {
            height: fit-content;
        }

        >.login {
            flex-direction: column;
            width: fit-content;

            >i {
                display: none;
            }

            >:first-child {
                padding: 0.5rem;

                >i {
                    width: calc(var(--login-logo-width) / 2);
                }

                h4,
                p {
                    display: none !important;
                }
            }
        }

        form {
            border-radius: 1rem !important;
        }
    }
}

.login-error-box {
    color: var(--color-dahong);
    font-size: var(--login-font-size, 0.75rem);
    font-weight: 400;
    line-height: 1.25rem;
    letter-spacing: -0.0175rem;
    margin-bottom: 0.5rem;
}

/**************************************** auth-stack 화면 보정 */
/* 그쪽 login.js 가 쓰는 요소에만 건다. 위 디자인 규칙은 건드리지 않는다 */

.hidden { display: none !important; }

/* 입력한 글자. 어두운 칸 위라 흰색으로 둔다. PM_ver5 는 #password 가 빠져 본문색(#111)으로 보인다 */
#identifier, #password { color: #fff; }

/* login.js 가 성공·실패에 따라 error 를 토글한다 */
#statusBox { color: #fff; }
#statusBox.error { color: var(--color-dahong); }

/* 안내문. 폼 마지막 자식이라 링크 모양이 붙는 것을 되돌린다 */
#hint {
    color: #aaa;
    font-size: var(--login-font-size, 0.75rem);
    line-height: 1.25rem;
    letter-spacing: -0.0175rem;
    text-decoration: none;
    cursor: default;
}

/* 폼의 마지막 자식이라 링크 모양이 붙는다 */
#oidcButton {
    color: #fff;
    text-decoration: none;
}

/* 입력 전에는 submitButton 이 disabled 로 시작한다 */
#submitButton:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
#submitButton:disabled:hover {
    background: rgba(17, 17, 17, 0.20);
    scale: 1;
}
