/*
 * REA public login page reference.
 * Strictly scoped to html.ows-login-reference so no other OJS page changes.
 */
html.ows-login-reference,
html.ows-login-reference body {
    background: #fbfbfa;
}

html.ows-login-reference .pkp_structure_main {
    width: 100%;
    max-width: none;
    padding: 0;
}

html.ows-login-reference .page_login {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: calc(100vh - 80px);
    box-sizing: border-box;
    margin: 0;
    padding: 12px 24px 60px;
    overflow: hidden;
    background: linear-gradient(180deg, #fcfcfb 0%, #f8f8f7 100%);
}

html.ows-login-reference .page_login > :not(.ows_login_shell) {
    display: none !important;
}

/* Very light botanical/wave artwork outside the card. */
html.ows-login-reference .page_login::before,
html.ows-login-reference .page_login::after {
    content: '';
    position: absolute;
    z-index: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
}

html.ows-login-reference .page_login::before {
    left: -4px;
    bottom: -8px;
    width: 325px;
    height: 300px;
    opacity: .88;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 325 300'%3E%3Cg fill='none' stroke='%23e7e2dd' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M18 300C6 222 13 130 29 22'/%3E%3Cpath d='M53 300C38 219 51 137 75 42'/%3E%3Cpath d='M86 300C72 233 86 165 110 87'/%3E%3Cpath d='M118 300C105 246 125 190 153 122'/%3E%3Cpath d='M46 299C102 267 143 225 187 158'/%3E%3Cpath d='M77 299C140 270 190 248 278 236'/%3E%3Cpath d='M107 298C167 281 221 272 314 268' opacity='.72'/%3E%3C/g%3E%3Cg fill='none' stroke='%23dde0dd' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M75 300C101 253 118 206 132 154'/%3E%3Cpath d='M130 154c-5-19-4-37 3-54'/%3E%3Cpath d='M129 139c13 4 25 13 34 26'/%3E%3Cpath d='M126 121c-15 3-27 11-38 25'/%3E%3Cpath d='M137 184c16 3 30 13 41 28'/%3E%3Cpath d='M134 196c-14 4-25 13-34 27'/%3E%3C/g%3E%3C/svg%3E");
    background-position: left bottom;
}

html.ows-login-reference .page_login::after {
    right: -18px;
    bottom: -5px;
    width: 500px;
    height: 245px;
    opacity: .84;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 245'%3E%3Cg fill='none' stroke='%23ece2dc' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M78 245C186 204 305 180 500 169'/%3E%3Cpath d='M49 220C166 164 290 136 500 123'/%3E%3Cpath d='M24 193C151 125 282 91 500 76'/%3E%3Cpath d='M7 167C143 91 276 52 500 31' opacity='.58'/%3E%3C/g%3E%3C/svg%3E");
    background-position: right bottom;
}

html.ows-login-reference .ows_login_shell {
    position: relative;
    z-index: 1;
    width: min(700px, calc(100vw - 48px));
    min-height: 0;
    box-sizing: border-box;
    padding: 47px 86px 30px;
    background: rgba(255,255,255,.97);
    border: 1px solid #e5e7e6;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(28, 49, 59, .10);
    overflow: hidden;
}

html.ows-login-reference .ows_login_shell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: #075e65;
}

/* Pale artwork inside the bottom of the card. */
html.ows-login-reference .ows_login_surface_decor,
html.ows-login-reference .ows_login_surface_decor::before,
html.ows-login-reference .ows_login_surface_decor::after {
    position: absolute;
    pointer-events: none;
}

html.ows-login-reference .ows_login_surface_decor {
    inset: 0;
    z-index: 0;
}

html.ows-login-reference .ows_login_surface_decor::before,
html.ows-login-reference .ows_login_surface_decor::after {
    content: '';
}

html.ows-login-reference .ows_login_surface_decor::before {
    left: -3px;
    bottom: -2px;
    width: 215px;
    height: 150px;
    opacity: .83;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 215 150'%3E%3Cg fill='none' stroke='%23eee5df' stroke-width='1.8'%3E%3Cpath d='M0 145c55-51 108-80 202-103'/%3E%3Cpath d='M0 126c62-42 111-62 190-78'/%3E%3Cpath d='M4 149c54-26 96-39 162-49'/%3E%3C/g%3E%3C/svg%3E") no-repeat left bottom/contain;
}

html.ows-login-reference .ows_login_surface_decor::after {
    right: 26px;
    bottom: 22px;
    width: 102px;
    height: 140px;
    opacity: .42;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 102 140'%3E%3Cg fill='none' stroke='%23dce0dd' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M32 140c3-44 12-77 32-116'/%3E%3Cpath d='M22 45c12-1 22 5 31 17'/%3E%3Cpath d='M13 80c13 0 23 6 33 18'/%3E%3Cpath d='M43 59c12 1 22 8 30 21'/%3E%3Cpath d='M36 95c12 1 21 8 29 22'/%3E%3C/g%3E%3C/svg%3E") no-repeat center/contain;
}

html.ows-login-reference .ows_login_intro,
html.ows-login-reference .ows_login_notices,
html.ows-login-reference #login,
html.ows-login-reference .page_login form.login {
    position: relative;
    z-index: 2;
}

html.ows-login-reference .ows_login_intro {
    margin: 0 0 42px;
    text-align: center;
}

html.ows-login-reference .ows_login_intro_logo {
    display: block;
    width: 105px;
    height: auto;
    margin: 0 auto 18px;
}

html.ows-login-reference .ows_login_intro h2 {
    margin: 0;
    color: #07545b;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
}

html.ows-login-reference .ows_login_intro p {
    margin: 9px auto 0;
    color: #66757d;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
}

html.ows-login-reference .ows_login_intro_accent {
    display: none;
    width: 58px;
    height: 2px;
    margin: 15px auto 0;
    background: #e36f35;
}

html.ows-login-reference .ows_login_notices {
    width: 366px;
    max-width: 100%;
    margin: 0 auto 14px;
}

html.ows-login-reference .ows_login_notices > * {
    margin: 0 0 8px;
    padding: 9px 11px;
    color: #4b5b65;
    background: #f5f9fa;
    border-left: 3px solid #0b6267;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.45;
}

html.ows-login-reference #login,
html.ows-login-reference .page_login form.login {
    width: 366px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

html.ows-login-reference #login fieldset.fields,
html.ows-login-reference .page_login form.login fieldset.fields {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

html.ows-login-reference #login .username,
html.ows-login-reference #login .password {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px;
}

html.ows-login-reference #login .username > label,
html.ows-login-reference #login .password > label {
    display: block;
    width: 100%;
    color: #14232b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
}

html.ows-login-reference #login .username .label,
html.ows-login-reference #login .password .label {
    display: block;
    margin: 0 0 7px;
}


/* Remove standalone journal/context headings from the login form. */
html.ows-login-reference #login > h1,
html.ows-login-reference #login > h2,
html.ows-login-reference #login > h3,
html.ows-login-reference #login > h4,
html.ows-login-reference #login > h5,
html.ows-login-reference #login > h6,
html.ows-login-reference #login > .title,
html.ows-login-reference #login > .page_title,
html.ows-login-reference #login > .journal_title,
html.ows-login-reference #login > .context_title,
html.ows-login-reference #login fieldset.fields > legend,
html.ows-login-reference #login fieldset.fields > h1,
html.ows-login-reference #login fieldset.fields > h2,
html.ows-login-reference #login fieldset.fields > h3,
html.ows-login-reference #login fieldset.fields > h4,
html.ows-login-reference #login fieldset.fields > h5,
html.ows-login-reference #login fieldset.fields > h6 {
    display: none !important;
}

html.ows-login-reference #login .required,
html.ows-login-reference #login .pkp_screen_reader,
html.ows-login-reference .page_login > h1,
html.ows-login-reference .page_login > p,
html.ows-login-reference .page_login > .cmp_breadcrumbs,
html.ows-login-reference .page_login > .pkp_breadcrumbs {
    display: none !important;
}

html.ows-login-reference #login input[type='text'],
html.ows-login-reference #login input[type='email'],
html.ows-login-reference #login input[type='password'],
html.ows-login-reference #login .ows_login_password_wrap input {
    display: block;
    width: 100% !important;
    height: 40px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 40px;
    color: #24353d;
    background: #fff;
    border: 1px solid #ccd6dc;
    border-radius: 5px;
    outline: 0;
    box-shadow: none;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

html.ows-login-reference #login .username input {
    padding-left: 40px;
    padding-right: 14px;
}

html.ows-login-reference #login .password input,
html.ows-login-reference #login .ows_login_password_wrap input {
    padding-left: 40px;
    padding-right: 38px;
    background: #eaf2ff;
}

html.ows-login-reference #login input::placeholder {
    color: #87939a;
    opacity: 1;
}

html.ows-login-reference #login input[type='text']:focus,
html.ows-login-reference #login input[type='email']:focus,
html.ows-login-reference #login input[type='password']:focus,
html.ows-login-reference #login .ows_login_password_wrap input:focus {
    border-color: #7898aa;
    box-shadow: 0 0 0 2px rgba(10,98,103,.07);
}

html.ows-login-reference .ows_login_password_wrap {
    position: relative;
    display: block;
    width: 100%;
}

html.ows-login-reference .ows_login_password_toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    transform: translateY(-50%);
    color: #6b7d86;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

html.ows-login-reference .ows_login_password_toggle:hover,
html.ows-login-reference .ows_login_password_toggle:focus-visible {
    color: #0b6267;
    background: transparent;
    outline: none;
}

html.ows-login-reference .ows_login_password_toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
}

html.ows-login-reference #login .password > label > a {
    display: inline-block;
    margin-top: 6px;
    color: #111 !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
}

html.ows-login-reference #login .password > label > a:hover,
html.ows-login-reference #login .password > label > a:focus-visible {
    color: #075e65 !important;
    text-decoration: underline;
}

html.ows-login-reference #login .pkp_form_error {
    margin: 0 0 12px;
    padding: 10px 12px;
    color: #8a2f2f;
    background: #fff5f4;
    border: 1px solid #f2cfca;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.45;
}

html.ows-login-reference #login .recaptcha_wrapper,
html.ows-login-reference #login .altcha_wrapper {
    width: 100% !important;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

html.ows-login-reference #login .buttons {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin: 14px 0 0;
    padding: 0;
}

html.ows-login-reference #login .buttons .submit {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 40px;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 14px;
    color: #111 !important;
    background: #fff !important;
    border: 1px solid #d0d9de !important;
    border-radius: 5px;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

html.ows-login-reference #login .buttons .submit:hover,
html.ows-login-reference #login .buttons .submit:focus-visible {
    color: #075e65 !important;
    border-color: #7aa0a5 !important;
    background: #fff !important;
    outline: none;
}

html.ows-login-reference #login .remember.checkbox {
    width: 100% !important;
    margin: 24px 0 0;
}

html.ows-login-reference #login .remember.checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    color: #596971;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    cursor: pointer;
}

html.ows-login-reference #login .remember.checkbox input[type='checkbox'] {
    appearance: none;
    position: relative;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid #0a6267;
    border-radius: 3px;
    background: #0a6267;
    cursor: pointer;
}

html.ows-login-reference #login .remember.checkbox input[type='checkbox']::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

html.ows-login-reference .ows_login_post_actions {
    width: 100%;
    margin: 14px 0 0;
}

html.ows-login-reference .ows_login_divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 15px;
    color: #65727a;
}

html.ows-login-reference .ows_login_divider span {
    height: 1px;
    background: #d5dcdf;
}

html.ows-login-reference .ows_login_divider em {
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
}

html.ows-login-reference .ows_login_post_actions .register {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 40px;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 14px;
    color: #073e45 !important;
    background: rgba(255,255,255,.97) !important;
    border: 1px solid #075e65 !important;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

html.ows-login-reference .ows_login_post_actions .register:hover,
html.ows-login-reference .ows_login_post_actions .register:focus-visible {
    color: #fff !important;
    background: #075e65 !important;
    outline: none;
}

/* 3.10.558.0: keep the login controls exactly as wide as Register. */
html.ows-login-reference .pkp_structure_content,
html.ows-login-reference .pkp_structure_main,
html.ows-login-reference .page_login {
    margin-top: 0 !important;
}

html.ows-login-reference .pkp_structure_content {
    padding-top: 0 !important;
}

html.ows-login-reference #login .username,
html.ows-login-reference #login .password,
html.ows-login-reference #login .username > label,
html.ows-login-reference #login .password > label,
html.ows-login-reference #login .ows_login_password_wrap,
html.ows-login-reference #login .buttons,
html.ows-login-reference #login .buttons .submit,
html.ows-login-reference .ows_login_post_actions,
html.ows-login-reference .ows_login_post_actions .register {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

html.ows-login-reference #login input[type='text'],
html.ows-login-reference #login input[type='email'],
html.ows-login-reference #login input[type='password'],
html.ows-login-reference #login .ows_login_password_wrap input {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    inline-size: 100% !important;
    box-sizing: border-box !important;
}

html[dir='rtl'].ows-login-reference .ows_login_notices > * {
    border-left: 0;
    border-right: 3px solid #0b6267;
}

html[dir='rtl'].ows-login-reference #login input[type='text'],
html[dir='rtl'].ows-login-reference #login input[type='email'],
html[dir='rtl'].ows-login-reference #login input[type='password'],
html[dir='rtl'].ows-login-reference #login .ows_login_password_wrap input {
    text-align: right;
}

html[dir='rtl'].ows-login-reference .ows_login_password_toggle {
    right: auto;
    left: 6px;
}

@media (max-width: 767px) {
    html.ows-login-reference .page_login {
        min-height: 0;
        padding: 28px 14px 36px;
    }

    html.ows-login-reference .page_login::before,
    html.ows-login-reference .page_login::after {
        opacity: .4;
    }

    html.ows-login-reference .ows_login_shell {
        width: min(100%, 700px);
        min-height: 0;
        padding: 34px 24px 32px;
        border-radius: 10px;
    }

    html.ows-login-reference .ows_login_intro {
        margin-bottom: 32px;
    }

    html.ows-login-reference .ows_login_intro_logo {
        width: 96px;
    }

    html.ows-login-reference .ows_login_intro h2 {
        font-size: 21px;
    }

    html.ows-login-reference .ows_login_intro p {
        font-size: 13px;
    }

    html.ows-login-reference #login,
    html.ows-login-reference .page_login form.login,
    html.ows-login-reference .ows_login_notices {
        width: 100% !important;
        max-width: 366px !important;
    }

    html.ows-login-reference #login .remember.checkbox {
        margin-top: 34px;
    }
}
