/* Phone layout shared by the auth forms: login, register, forgot-password,
   reset-password, register/resend. Desktop keeps the label-left / 330px-field
   layout from each page's own stylesheet; below 520px the label goes above
   the field and everything takes the full width. */
@media (max-width: 520px) {
    .page-shell:has(.register-wrapper, .forgot-wrapper) {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 28px;
    }

    .register-wrapper,
    .forgot-wrapper {
        width: 100%;
    }

    .register-title,
    .forgot-title {
        margin-left: 0;
        font-size: 22px;
        letter-spacing: 1px;
        line-height: 1.15;
    }

    .register-form,
    .forgot-form {
        margin-top: 12px;
    }

    /* Label on its own line, field fills the rest; the availability badge
       and the register eye button stay beside the field */
    .form-row {
        flex-wrap: wrap;
        gap: 6px 8px;
        margin-bottom: 8px;
    }

    .form-label {
        flex: 0 0 100%;
        width: auto;
        text-align: left;
    }

    .form-label:empty {
        display: none;
    }

    .form-input-wrap {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
    }

    .form-input {
        width: 100%;
        box-sizing: border-box;
    }

    .form-availability {
        width: auto;
        margin-left: 0;
    }

    .form-availability:empty {
        display: none;
    }

    .form-row > .form-eye-btn {
        margin-left: 0;
        padding: 0 4px;
    }

    /* Login puts the eye inside the field wrap (desktop: just outside the
       field); on a phone keep it inside, left of the check icon */
    .form-input-wrap > .form-eye-btn {
        right: 30px;
    }

    .form-input-wrap:has(> .form-eye-btn) .form-input {
        padding-right: 58px;
    }

    .form-hint {
        margin-left: 0;
    }

    .form-newsletter {
        white-space: normal;
        width: auto;
    }

    .form-row-check {
        flex-wrap: wrap;
        gap: 6px 8px;
        margin-left: 0;
    }

    .form-check-label {
        flex: 0 0 100%;
        width: auto;
        text-align: left;
    }

    .form-submit-row,
    .form-login-row {
        width: auto;
        margin-left: 0;
    }

    .form-login-row {
        flex-wrap: wrap;
    }
}
