/*
    We use `postcss-cli` with `autoprefixer` to prefix the CSS:
    `BROWSERSLIST="last 2 versions, > 0.5%" postcss styles.css -r -u autoprefixer --verbose --no-map`

    install related packages
    `yarn global add postcss-cli autoprefixer postcss`
*/

html {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Remove iOS input type */
input[type="text"],
input[type="password"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

body * {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    font-family: Roboto, system-ui, sans-serif;
    font-style: normal;
}

.hidden {
    display: none;
}

.announce-board {
    border: 1px solid #ffdba6;
    background: #fff2de;
    color: #7f8284;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
}

.flex-container {
    width: 900px;
    text-align: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin: 30px auto 49px;
    -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    font-size: 16px;
    overflow: hidden;
}

.area-flex-item {
    padding: 27px 45px;
    width: 50%;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
}

.announce-graphs-area {
    background-color: #ffffff;
}

.login-form-area {
    background-color: #eaeaea;
    color: #999999;
    padding-top: 64px;
}

.login-form-container {
    width: 290px;
    margin: 0 auto;
    position: relative;
}

.login-logo {
    margin: 0 auto 20px;
    width: 272px;
}

.login-logo > img {
    width: 100%;
}

.form-control {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    background: #ffffff;
    -webkit-box-shadow: none;
    box-shadow: none;
    height: 45px;
    border: 0 solid transparent;
    border-radius: 5px;
    margin-bottom: 16px;
    color: #222222;
    -webkit-transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
    transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
}

.form-control input {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    border-radius: 5px;
}
.form-control input.no-border-right-radius {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.form-control input::-webkit-input-placeholder {
    color: #999999;
}

.form-control input::-moz-placeholder {
    color: #999999;
}

.form-control input::-ms-input-placeholder {
    color: #999999;
}

.form-control input:-ms-input-placeholder {
    color: #999999;
}

.form-control input::placeholder {
    color: #999999;
}

.form-control:focus-within {
    color: #212529;
    background-color: #ffffff;
    border: 1px solid #86b7fe;
    outline: 0;
    -webkit-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control > .password-input-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow: hidden;
}

.form-control > .password-input-wrapper > input {
    display: block;
    width: 100%;
}

/* edge 會自動在密碼欄位加上明碼開關，這邊讓它不顯示 */
.form-control > .password-input-wrapper > input::-ms-reveal,
.form-control > .password-input-wrapper > input::-ms-clear {
  display: none;
}

.toggle-password-visible {
    height: 45px;
    line-height: 45px;
    vertical-align: middle;
    cursor: pointer;
    text-align: center;
    min-width: 80px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    padding: 0 16px;
    white-space: nowrap;
    flex: none;
    font-size: 16px;
}


.form-control.error {
    border: 1px solid #D94E41;
}

.form-control.error:focus-within {
    border: none;
}

.login-form .btn-login {
    margin-top: 40px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 5px;
    border: none;
    width: 100%;
    height: 50px;
    background-color: #333333;
    color: #ffffff;
    cursor: pointer;
}

.login-form .btn-login:hover {
    background-color: #000000;
}

.login-form .btn-login:focus {
    outline: 0;
}

.login-form .alert {
    text-align: left;
}


.alert-error {
    margin-bottom: 16px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
    color: #D94E41;
}

.alert-error img {
    padding-right: 4px;
    -ms-flex-item-align: start;
    align-self: flex-start;
}

.alert-error p {
    margin: 0;
    word-break: break-word;
}

.alert-error a {
    color: #0984E3;
}

.login-footer {
    font-size: 12px;
    text-align: center;
    color: #999999;
    margin-top: 24px;
}

.login-footer p {
    margin: 0;
    margin-bottom: 4px;
}

#announce-graphs {
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.announce-graph {
    width: 360px;
    height: 180px;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 180px;
    flex: 0 0 180px;
    overflow: hidden;
    display: block;
    background: #e5e5e5;
    border-radius: 10px;
    margin-bottom: 10px;
    position: relative;
    background-color: #f5f5f5;
}

a.announce-graph {
    text-decoration: none;
}

.announce-graph:last-child {
    margin-bottom: 0;
}

.announce-graph > .announce-graph-img {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
}

.announce-graph .announce-graph-default-img {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 272px;
}

.login-error-and-reset-password-area {
    position: relative;
}

.login-error-and-reset-password-area > #reset-password-button-container {
    display: flex;
    justify-content: right;
}

#reset-password-button-container > .reset-password-link {
    color: #0984E3;
    text-decoration: none;
}

.login-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
}

.login-switch > a {
    color: #0984E3;
    text-decoration: none;
}


/* Below iPad Mini landscape */
@media screen and (max-width: 1023px) {
    .announce-board {
        padding: 16px 20px;
        margin-bottom: -12px;
        font-size: 13px;
        line-height: 20px;
    }

    .flex-container {
        width: 100%;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-flow: column;
        flex-flow: column;
        border-radius: 0px;
        -webkit-box-shadow: none;
        box-shadow: none;
        margin-top: 24px;
    }

    .area-flex-item {
        width: 100%;
        -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        padding: 0;
    }

    .announce-graphs-area {
        margin-top: 32px;
        background-color: transparent;
        -webkit-box-ordinal-group: 3;
        -ms-flex-order: 2;
        order: 2;
    }

    .login-form-area {
        background-color: transparent;
        color: #999999;
        -webkit-box-shadow: none;
        box-shadow: none;
        -webkit-box-ordinal-group: 2;
        -ms-flex-order: 1;
        order: 1;
    }

    .form-control {
        border: 1px solid #999999;
    }

    .announce-graphs {
        -webkit-box-pack: start;
        -ms-flex-pack: start;
        justify-content: flex-start;
    }

    .announce-graph {
        width: 288px;
        height: 144px;
        -webkit-box-flex: 0;
        -ms-flex: 0 0 144px;
        flex: 0 0 144px;
    }

    .announce-graph .announce-graph-default-img {
        width: 210px;
    }
}

/* iPad Mini landscape and above  */
@media screen and (min-width: 1024px) {
    .announce-board {
        padding: 16px 32px;
        margin: 24px auto -6px;
        border-radius: 5px;
        width: 900px;
    }
}

/* iPad Mini landscape */
@media screen and (width: 1024px) and (orientation: landscape) {
    .flex-container {
        margin-top: 40px;
    }
    .announce-board {
        margin-bottom: -24px;
    }
}

/* Super small device fallback */
@media screen and (max-width: 320px) {
    .announce-graph {
        max-width: 95%;
    }
}
