/* ==========================================================
   RESET
========================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;

    color: var(--z-auth-text);
    background: var(--z-auth-white);

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* ==========================================================
   PAGE
========================================================== */

.auth-page {
    width: 100%;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 48px 24px;
}


/* ==========================================================
   CONTAINER
========================================================== */

.auth-container {
    width: 100%;
    max-width: 450px;

    margin: 0 auto;
    padding: 0;

    background: transparent;

    border: 0;
    border-radius: 0;

    box-shadow: none;
}


/* ==========================================================
   HEADER
========================================================== */

.auth-header {
    margin-bottom: 36px;

    text-align: center;
}

.auth-header h1 {
    max-width: 420px;

    margin: 0 auto;

    color: var(--z-auth-text);

    font-size: 30px;
    line-height: 1.16;
    font-weight: 600;

    letter-spacing: -1.15px;
}


/* ==========================================================
   FORM
========================================================== */

#loginForm {
    width: 100%;
}


/* ==========================================================
   FORM GROUP
========================================================== */

.form-group {
    width: 100%;

    margin-bottom: 13px;
}


/* ==========================================================
   INPUT WRAPPER
========================================================== */

.input-wrapper {
    position: relative;

    display: block;

    width: 100%;
}


/* ==========================================================
   INPUT
========================================================== */

.input-wrapper input {
    width: 100%;
    height: 56px;

    padding: 0 18px;

    color: var(--z-auth-text);
    background: var(--z-auth-white);

    border: 1px solid var(--z-auth-border);
    border-radius: 12px;

    outline: none;

    font-family: inherit;
    font-size: 15px;
    font-weight: 400;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.input-wrapper input::placeholder {
    color: var(--z-auth-light-gray);
}

.input-wrapper input:hover {
    border-color: #b8b8bd;
}

.input-wrapper input:focus {
    border-color: var(--z-auth-orange);

    box-shadow:
        0 0 0 3px rgba(247, 105, 2, 0.11);
}


/* ==========================================================
   PASSWORD
========================================================== */

#password {
    padding-right: 52px;
}


/* ==========================================================
   PASSWORD TOGGLE
========================================================== */

.toggle-password {
    position: absolute;

    top: 50%;
    right: 8px;

    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    padding: 0;

    color: var(--z-auth-gray);
    background: transparent;

    border: 0;
    border-radius: 50%;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

.toggle-password:hover {
    color: var(--z-auth-black);
    background: #f5f5f7;
}

.toggle-password i {
    font-size: 14px;
}


/* ==========================================================
   OPTIONS
========================================================== */

.auth-options {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin: 6px 0 25px;

    color: var(--z-auth-gray);

    font-size: 12px;
}


/* ==========================================================
   REMEMBER
========================================================== */

.remember {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    color: var(--z-auth-gray);

    cursor: pointer;
    user-select: none;
}

.remember input {
    width: 16px;
    height: 16px;

    margin: 0;

    accent-color: var(--z-auth-orange);

    cursor: pointer;
}

.remember span {
    white-space: nowrap;
}


/* ==========================================================
   FORGOT PASSWORD
========================================================== */

.auth-options a {
    color: var(--z-auth-text);

    font-size: 12px;
    font-weight: 500;

    text-decoration: none;

    white-space: nowrap;
}

.auth-options a:hover {
    text-decoration: underline;
}


/* ==========================================================
   MESSAGE
========================================================== */

.auth-message {
    display: block;

    width: 100%;
    min-height: 18px;

    margin: 0 0 10px;
    padding: 0;

    background: transparent;

    border: 0;
    border-radius: 0;

    font-size: 12px;
    line-height: 1.45;

    text-align: left;
}

.auth-message:empty {
    visibility: hidden;
}

.auth-message.error {
    visibility: visible;

    color: var(--z-auth-error);
}

.auth-message.success {
    visibility: visible;

    color: var(--z-auth-success);
}


/* ==========================================================
   LOGIN BUTTON
========================================================== */

.login-btn {
    width: 100%;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 0 22px;

    color: #ffffff;
    background: var(--z-auth-black);

    border: 0;
    border-radius: 12px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        transform 0.18s ease,
        opacity 0.18s ease;
}

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

    transform: none;
}

.login-btn:active {
    transform: scale(0.99);
}

.login-btn:disabled {
    opacity: 0.62;

    cursor: not-allowed;
}


/* ==========================================================
   CREATE ACCOUNT
========================================================== */

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    margin-top: 24px;
    padding: 0;

    border: 0;

    font-size: 12px;

    text-align: center;
}

.auth-footer p {
    margin: 0;

    color: var(--z-auth-gray);

    font-size: inherit;
}

.auth-footer a {
    color: var(--z-auth-text);

    font-size: inherit;
    font-weight: 600;

    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--z-auth-text);

    text-decoration: underline;
}


/* ==========================================================
   SELLER
========================================================== */

.seller-access {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    margin-top: 10px;
    padding: 0;

    color: var(--z-auth-light-gray);

    border: 0;

    font-size: 11px;
    line-height: 1.5;

    text-align: center;
}

.seller-access span {
    margin: 0;
}

.seller-access a {
    color: var(--z-auth-text);

    font-size: inherit;
    font-weight: 600;

    text-decoration: none;

    white-space: nowrap;
}

.seller-access a:hover {
    color: var(--z-auth-text);

    text-decoration: underline;
}


/* ==========================================================
   ACCESSIBILITY
========================================================== */

.auth-page button:focus-visible,
.auth-page a:focus-visible,
.auth-page input:focus-visible {
    outline: 3px solid rgba(247, 105, 2, 0.22);
    outline-offset: 3px;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {

    .auth-page {
        min-height: 100svh;

        align-items: flex-start;

        padding:
            max(70px, env(safe-area-inset-top))
            20px
            max(32px, env(safe-area-inset-bottom));
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-header {
        margin-bottom: 32px;

        text-align: center;
    }

    .auth-header h1 {
        max-width: 330px;

        font-size: 27px;

        letter-spacing: -0.9px;
    }

    .input-wrapper input,
    .login-btn {
        height: 54px;
    }

    .input-wrapper input {
        font-size: 15px;
    }

}


/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 400px) {

    .auth-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .auth-header h1 {
        max-width: 310px;

        font-size: 26px;
    }

    .auth-options {
        gap: 12px;

        font-size: 11px;
    }

    .auth-options a {
        font-size: 11px;
    }

    .auth-footer {
        flex-wrap: wrap;

        font-size: 11px;
    }

    .seller-access {
        flex-wrap: wrap;

        font-size: 10.5px;
    }

}


/* ==========================================================
   VERY SMALL MOBILE
========================================================== */

@media (max-width: 340px) {

    .auth-options {
        align-items: flex-start;
        flex-direction: column;

        gap: 10px;
    }

}


/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

}