:root {
    color: #0d0d0d;
    background: #fcfcfc;
    font-family: 'IranSansFaNum', sans-serif;
}

body {
    margin: 0;
}

.auth2-wrap,
.auth2-wrap * {
    box-sizing: border-box;
}

.auth2-wrap {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth2-wrap--welcome {
    padding-block-end: 89px;
}

.auth2-card {
    isolation: isolate;
    position: relative;
    width: min(100%, 416px);
    padding: 23px 19px;
    border: 1px solid #d7d7d7;
    border-radius: 15px;
    box-shadow: -2px 2px 15px rgb(113 113 113 / 12%);
    overflow: hidden;
}

.auth2-card::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -1px;
    left: -1px;
    width: 107px;
    height: 161px;
    background: url('/morgan/assets/images/login/logo%20green%202.svg') no-repeat;
    pointer-events: none;
}

.auth2-card__logo {
    display: grid;
    place-items: center;
    width: 244px;
    height: 72px;
    margin: 0 auto 42px;
}

.auth2-card__logo img {
    display: block;
    width: 243px;
    height: 72px;
}

.auth2-card__title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    line-height: 35px;
}

.auth2-card__desc {
    margin: 0 0 32px;
    color: #484848;
    font-size: 14.22px;
    line-height: 28px;
}

.auth2-card--confirm .auth2-card__desc {
    min-height: 56px;
}

.auth2-card--welcome .auth2-card__desc {
    min-height: 84px;
}

.auth2-card__desc a,
.auth2-rules a {
    color: #0b6cc6;
    text-decoration: none;
}

.auth2-card__desc a:hover,
.auth2-rules a:hover {
    text-decoration: underline;
}

.auth2-form {
    margin-inline: 10px;
}

.auth2-field {
    min-height: 117px;
    margin-bottom: 40px;
}

.auth2-field__label {
    display: block;
    margin-bottom: 8px;
    color: #071d0e;
    font: 500 14.22px / 28px 'IRANSansX', sans-serif;
}

.auth2-field__box,
.auth2-otp__box {
    height: 54px;
    min-width: 0;
    padding: 0;
    border: 1px solid #071d0e;
    border-radius: 5px;
    background: #fff;
    color: #0d0d0d;
    font: 500 16px / 30px 'IranSansFaNum', sans-serif;
}

.auth2-field__box {
    display: block;
    width: 100%;
    padding-inline: 11px;
    border-color: #d7d7d7;
    border-radius: 4px;
    box-shadow: -2px 2px 15px -1px rgb(113 113 113 / 12%);
    text-align: left;
}

.auth2-field__box::placeholder {
    color: #bebebe;
    opacity: 1;
}

.auth2-field.is-error {
    --auth2-input-focus: #870b0f;
    color: #870b0f;
}

.auth2-field.is-error .auth2-field__label {
    color: inherit;
}

.auth2-field.is-error input {
    border-color: #870b0f;
}

.auth2-field__error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    font-size: 9.99px;
    line-height: 19px;
}

.auth2-field__error::before {
    content: '';
    flex: 0 0 15px;
    height: 15px;
    background: currentColor;
    mask: url('/morgan/assets/images/icons/exclamation-triangle.svg') center / contain no-repeat;
}

.auth2-otp {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-inline: 1px;
}

.auth2-otp__box {
    width: 58px;
    text-align: center;
}

.auth2-otp__box:placeholder-shown {
    background-image: linear-gradient(#d7d7d7, #d7d7d7);
    background-position: center bottom 11px;
    background-repeat: no-repeat;
    background-size: min(42px, calc(100% - 12px)) 1px;
}

@media (hover: hover) {
    .auth2-otp__box:hover {
        border-color: var(--auth2-input-focus, #15542b);
    }
}

.auth2-btn {
    width: 100%;
    height: 48px;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 0 18px;
    cursor: pointer;
    font: 500 16px / 30px 'IranSansFaNum', sans-serif;
}

.auth2-btn--primary {
    background: #15542b;
    color: #fafafa;
}

.auth2-btn--primary:hover,
.auth2-btn--primary:active {
    background: #142;
}

.auth2-btn--outline {
    border-color: #15542b;
    background: transparent;
    color: #15542b;
}

.auth2-btn--outline:enabled:hover,
.auth2-btn--outline:enabled:active {
    border-color: #0d341a;
    background: #ebfaf0;
    color: #0d341a;
}

.auth2-btn:disabled {
    cursor: default;
}

.auth2-card :focus-visible {
    outline: 2px solid #0b6cc6;
    outline-offset: 2px;
}

.auth2-card :is(.auth2-field__box, .auth2-otp__box):focus {
    border-color: var(--auth2-input-focus, #15542b);
    outline: 2px solid transparent;
}

.auth2-card .auth2-otp__box:focus,
.auth2-card .auth2-field__box[aria-invalid="true"]:focus {
    box-shadow: inset 0 0 0 1px var(--auth2-input-focus, #15542b);
}

.auth2-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    grid-auto-flow: dense;
}

.auth2-actions .auth2-btn--primary {
    grid-column: 2;
}

.auth2-actions .auth2-btn--outline {
    grid-column: 1;
}

.auth2-rules {
    max-width: 333px;
    min-height: 22px;
    margin: 32px auto 0;
    color: #4d4d4d;
    font-size: 9.99px;
    line-height: 19px;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 575px) {
    .auth2-wrap {
        display: block;
        padding-block: 0;
    }

    .auth2-card {
        width: min(100%, 416px);
        min-height: 100svh;
        margin-inline: auto;
        padding: max(131px, calc((100svh - var(--detail-height)) / 2 + var(--detail-offset))) 0 24px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    .auth2-card--phone {
        --detail-height: 395px;
        --detail-offset: -17.5px;
    }

    .auth2-card--confirm {
        --detail-height: 431px;
        --detail-offset: 0.5px;
    }

    .auth2-card--welcome {
        --detail-height: 277px;
        --detail-offset: -28.5px;
    }

    .auth2-card::before {
        content: none;
    }

    .auth2-card__logo {
        position: absolute;
        top: 64px;
        left: 50%;
        width: 145px;
        height: 43px;
        margin: 0;
        translate: -50% 0;
    }

    .auth2-card__logo img {
        width: 145px;
        height: 43px;
    }

    .auth2-card__title {
        font-size: 17.07px;
        line-height: 33px;
    }

    .auth2-card--phone .auth2-card__desc,
    .auth2-card--confirm .auth2-card__desc {
        font-size: 15px;
        line-height: 29px;
    }

    .auth2-card--phone .auth2-card__desc {
        margin-bottom: 31px;
    }

    .auth2-card--confirm .auth2-card__desc {
        min-height: 84px;
        line-height: 28px;
    }

    .auth2-card--confirm .auth2-card__desc,
    .auth2-card--welcome .auth2-card__desc {
        text-align: justify;
    }

    .auth2-card--welcome .auth2-card__desc {
        margin-bottom: 40px;
    }

    .auth2-form {
        margin-inline: 0;
    }

    .auth2-field {
        min-height: 122px;
    }

    .auth2-field__label {
        font-size: 15px;
    }

    .auth2-field__error,
    .auth2-rules {
        font-size: 12.34px;
        line-height: 24px;
    }

    .auth2-error-extra {
        display: none;
    }

    .auth2-otp__box {
        width: 54px;
    }

    .auth2-btn {
        height: 44px;
        padding-inline: 14px;
    }

    .auth2-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .auth2-actions .auth2-btn--primary,
    .auth2-actions .auth2-btn--outline {
        grid-column: 1;
    }

    .auth2-rules {
        min-height: 48px;
        text-align: center;
        font-family: 'IRANSansX', sans-serif;
        white-space: normal;
    }
}
