/* ========================================
   PAGE
======================================== */

body.auth-open {
    overflow: hidden;
}



/* ========================================
   OVERLAY
======================================== */

.auth-overlay {
    position: fixed;
    inset: 0;

    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(32, 36, 42, 0);

    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .3s ease,
        background .3s ease,
        backdrop-filter .3s ease,
        visibility .3s ease;
}


.auth-overlay.is-open {
    background: rgba(32, 36, 42, .28);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}



/* ========================================
   LOGIN MODAL
======================================== */

.auth-modal {
    position: relative;

    width: min(100%, 430px);
    max-height: calc(100dvh - 48px);

    overflow-y: auto;

    padding: 42px 38px 36px;

    background: #F1F0EC;

    border: 1px solid rgba(32, 36, 42, .08);
    border-radius: 22px;

    box-shadow:
        0 18px 60px rgba(32, 36, 42, .14);

    opacity: 0;

    transform:
        translateY(22px)
        scale(.97);

    transition:
        opacity .25s ease,
        transform .4s cubic-bezier(.16, 1, .3, 1);
}


.auth-overlay.is-open .auth-modal {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}



/* ========================================
   CLOSE
======================================== */

.auth-close {
    position: absolute;

    top: 14px;
    right: 17px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    color: var(--text-soft);

    border: none;
    border-radius: 50%;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 27px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;

    transition:
        background .15s ease,
        color .15s ease;
}


.auth-close:hover {
    background:
        rgba(32, 36, 42, .07);

    color:
        var(--text);
}



/* ========================================
   CONTENT
======================================== */

.auth-content {
    opacity: 1;

    transform:
        translateY(0);

    transition:
        opacity .12s ease,
        transform .12s ease;
}


.auth-content.is-changing {
    opacity: 0;

    transform:
        translateY(4px);
}



/* ========================================
   HEADER
======================================== */

.auth-header {
    margin-bottom: 26px;
    padding-right: 30px;
}


.auth-title {
    margin: 0 0 7px;

    color:
        var(--text);

    font-size: 30px;
    font-weight: 800;
    line-height: 1.05;

    letter-spacing: -.035em;
}


.auth-description {
    margin: 0;

    color:
        var(--text-soft);

    font-size: 15px;
    line-height: 1.45;
}


.auth-description strong {
    color:
        var(--text);

    font-weight: 700;
}



/* ========================================
   FORM
======================================== */

.auth-form {
    display: flex;
    flex-direction: column;

    gap: 17px;
}



/* ========================================
   FIELD
======================================== */

.auth-field {
    display: flex;
    flex-direction: column;

    gap: 7px;
}


.auth-field label {
    color:
        var(--text);

    font-size: 14px;
    font-weight: 700;
}


.auth-field input {
    width: 100%;
    height: 48px;

    padding:
        0 14px;

    background:
        var(--background);

    color:
        var(--text);

    border:
        1px solid
        rgba(32, 36, 42, .18);

    border-radius:
        12px;

    outline: none;

    font-family:
        inherit;

    font-size: 16px;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}


.auth-field input:hover {
    border-color:
        rgba(32, 36, 42, .32);
}


.auth-field input:focus {
    border-color:
        var(--accent);

    box-shadow:
        0 0 0 3px
        rgba(63, 145, 209, .12);
}



/* ========================================
   VERIFICATION
======================================== */

.verification-email {
    overflow-wrap: anywhere;
}


.verification-code {
    text-align: center;

    font-size: 24px !important;
    font-weight: 700;

    letter-spacing: .28em;

    font-variant-numeric:
        tabular-nums;
}



/* ========================================
   MESSAGE
======================================== */

.auth-message {
    min-height: 0;

    margin: 0;

    color:
        var(--text-soft);

    font-size: 14px;
    line-height: 1.4;
}


.auth-message:empty {
    display: none;
}


.auth-message.is-error {
    color:
        #A54848;
}


.auth-message.is-success {
    color:
        #557A58;
}



/* ========================================
   MAIN BUTTON
======================================== */

.auth-main-button {
    width: 100%;
    min-height: 48px;

    margin-top: 3px;

    padding:
        12px 18px;

    background:
        var(--text);

    color:
        var(--background);

    border: none;
    border-radius: 14px;

    font-family:
        inherit;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background .15s ease,
        transform .15s ease,
        opacity .15s ease;
}


.auth-main-button:hover {
    background:
        #34393F;

    transform:
        translateY(-1px);
}


.auth-main-button:active {
    transform:
        translateY(1px);
}


.auth-main-button:disabled {
    opacity: .6;

    cursor: default;

    transform: none;
}



/* ========================================
   TEXT BUTTON
======================================== */

.auth-text-button {
    display: block;

    margin:
        16px auto 0;

    padding: 3px;

    background:
        transparent;

    color:
        var(--text-soft);

    border: none;

    font-family:
        inherit;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}


.auth-text-button:hover {
    color:
        var(--accent);
}



/* ========================================
   DIVIDER
======================================== */

.auth-divider {
    width: 100%;
    height: 1px;

    margin:
        24px 0 20px;

    background:
        rgba(32, 36, 42, .10);
}



/* ========================================
   SWITCH
======================================== */

.auth-switch-text {
    margin: 0;

    color:
        var(--text-soft);

    font-size: 14px;
    line-height: 1.5;

    text-align: center;
}


.auth-link-button {
    margin-left: 3px;

    padding: 0;

    background:
        transparent;

    color:
        var(--accent);

    border: none;

    font-family:
        inherit;

    font-size:
        inherit;

    font-weight: 700;

    cursor: pointer;
}


.auth-link-button:hover {
    text-decoration:
        underline;
}