/* =========================================================
   banki.ru — login.css
   Вход / регистрация
   ========================================================= */


/* =========================================================
   AUTH MODAL
   ========================================================= */

#auth-modal .modal-card {
    width: min(100%, 430px);

    padding: 30px;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(61, 116, 211, 0.10),
            transparent 45%
        ),
        linear-gradient(
            145deg,
            rgba(17, 29, 49, 0.98),
            rgba(7, 14, 25, 0.99)
        );
}


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

#auth-modal .modal-kicker {
    margin-bottom: 9px;

    color: #6d9ee4;

    font-size: 9px;
    font-weight: 750;

    letter-spacing: 0.18em;
    text-transform: uppercase;
}

#auth-modal h2 {
    margin: 0;

    color: #f5f8ff;

    font-size: 26px;
    font-weight: 750;

    line-height: 1.15;

    letter-spacing: -0.04em;
}

#auth-modal #auth-modal-subtitle {
    margin: 9px 0 22px;

    color: #8492a7;

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   MODE SWITCHER
   ========================================================= */

.auth-mode-switcher {
    width: 100%;

    padding: 4px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 4px;

    margin-bottom: 22px;

    border: 1px solid rgba(255, 255, 255, 0.065);

    border-radius: 14px;

    background:
        rgba(3, 8, 15, 0.48);
}

.auth-mode-button {
    min-height: 38px;

    padding: 0 10px;

    border: 1px solid transparent;

    border-radius: 10px;

    background: transparent;

    color: #738198;

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

    cursor: pointer;

    transition:
        color 160ms ease,
        background 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.auth-mode-button:hover {
    color: #b7c6dc;
}

.auth-mode-button.active {
    color: #edf4ff;

    border-color:
        rgba(93, 147, 235, 0.18);

    background:
        linear-gradient(
            145deg,
            rgba(65, 118, 206, 0.22),
            rgba(45, 82, 145, 0.12)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 5px 16px rgba(0, 0, 0, 0.12);
}


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

.auth-form {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 15px;
}

.auth-form .field {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 7px;
}

.auth-form .field > span {
    padding-left: 2px;

    color: #9caabd;

    font-size: 11px;
    font-weight: 650;
}

.auth-form .field input {
    width: 100%;
    height: 47px;

    padding: 0 14px;

    border: 1px solid rgba(255, 255, 255, 0.085);

    border-radius: 13px;

    outline: none;

    background:
        rgba(3, 9, 17, 0.58);

    color: #edf4ff;

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

    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.15);

    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.auth-form .field input::placeholder {
    color: #4f5d72;
}

.auth-form .field input:hover {
    border-color:
        rgba(255, 255, 255, 0.12);
}

.auth-form .field input:focus {
    border-color:
        rgba(77, 141, 255, 0.60);

    background:
        rgba(5, 13, 24, 0.78);

    box-shadow:
        0 0 0 3px rgba(77, 141, 255, 0.09),
        inset 0 1px 1px rgba(0, 0, 0, 0.16);
}


/* =========================================================
   NAME FIELD
   ========================================================= */

#auth-name-field {
    animation: auth-field-in 170ms ease-out;
}


/* =========================================================
   ERROR
   ========================================================= */

.form-error {
    width: 100%;

    padding: 10px 12px;

    border: 1px solid rgba(255, 95, 109, 0.18);

    border-radius: 11px;

    background:
        rgba(255, 65, 82, 0.07);

    color: #ff8a96;

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

    line-height: 1.4;
}

.form-error.hidden {
    display: none !important;
}


/* =========================================================
   SUBMIT
   ========================================================= */

.auth-submit-button {
    width: 100%;

    min-height: 48px;

    margin-top: 3px;

    border-radius: 13px;

    font-size: 13px;
    font-weight: 700;
}

.auth-submit-button:not(:disabled):hover {
    transform: translateY(-1px);
}

.auth-submit-button:not(:disabled):active {
    transform: scale(0.985);
}

.auth-submit-button:disabled {
    cursor: wait;

    opacity: 0.58;

    filter: saturate(0.7);
}


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

#auth-password {
    letter-spacing: 0.02em;
}


/* =========================================================
   AUTOFILL
   ========================================================= */

#auth-modal input:-webkit-autofill,
#auth-modal input:-webkit-autofill:hover,
#auth-modal input:-webkit-autofill:focus {
    -webkit-text-fill-color: #edf4ff;

    -webkit-box-shadow:
        0 0 0 1000px #091321 inset;

    transition:
        background-color 9999s ease-out;
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

#auth-modal .modal-close {
    color: #738198;
}

#auth-modal .modal-close:hover {
    color: #f1f6ff;
}


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

@media (max-width: 640px) {
    #auth-modal .modal-card {
        width: 100%;

        padding:
            25px
            18px
            max(22px, env(safe-area-inset-bottom));

        border-radius: 22px 22px 16px 16px;
    }

    #auth-modal h2 {
        font-size: 24px;
    }

    #auth-modal #auth-modal-subtitle {
        margin-bottom: 20px;

        font-size: 12px;
    }

    .auth-mode-switcher {
        margin-bottom: 20px;
    }

    .auth-mode-button {
        min-height: 40px;
    }

    .auth-form {
        gap: 14px;
    }

    .auth-form .field input {
        height: 48px;

        font-size: 16px;
    }

    .auth-submit-button {
        min-height: 49px;

        margin-top: 2px;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {
    #auth-modal .modal-card {
        padding-left: 15px;
        padding-right: 15px;
    }

    #auth-modal h2 {
        font-size: 22px;
    }

    .auth-mode-button {
        font-size: 11px;
    }
}


/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes auth-field-in {
    from {
        opacity: 0;

        transform:
            translateY(-4px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


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

@media (prefers-reduced-motion: reduce) {
    #auth-name-field {
        animation: none;
    }
}